OSDN Git Service

For private server which has no condition for default time zone, refering to the...
authorsakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 27 Jan 2011 03:05:43 +0000 (03:05 +0000)
committersakamocchi <sakamocchi@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 27 Jan 2011 03:05:43 +0000 (03:05 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1108 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/globalfunctions.php

index 886be6a..1e51478 100755 (executable)
@@ -35,6 +35,21 @@ if ($CONF['debug']) {
 }\r
 \r
 /*\r
+ * Set default time zone\r
+ * By Japanese Packaging Team, Jan.27, 2011\r
+ * For private server which has no condition for default time zone\r
+ */\r
+\r
+if (function_exists('date_default_timezone_get')) {\r
+       if (FALSE == ($timezone = @date_default_timezone_get()) {\r
+               $timezone = 'UTC';\r
+       }\r
+}\r
+if (function_exists('date_default_timezone_set')) {\r
+        @date_default_timezone_set($timezone);\r
+}\r
+\r
+/*\r
        Indicates when Nucleus should display startup errors. Set to 1 if you want\r
        the error enabled (default), false otherwise\r
 \r