summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-07-16 17:09:49 -0400
committerEvan Prodromou <evan@prodromou.name>2008-07-16 17:09:49 -0400
commitd9b164b3bd48ef35cfc9819718cef487ab17fa8a (patch)
treee64e2432b85df07d9ecccf545839c87ac050fccd /lib/common.php
parent4798cd312694b614675b47da3a9cd2a08af0856a (diff)
default timezone
darcs-hash:20080716210949-84dde-b12d95acdf6f15887fe83fea8f968c972b862be5.gz
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common.php b/lib/common.php
index dca1ae94f..0203c2dea 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -45,6 +45,7 @@ $config =
'email' =>
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : NULL,
'broughtby' => NULL,
+ 'timezone' => 'UTC',
'broughtbyurl' => NULL),
'syslog' =>
array('appname' => 'laconica', # for syslog
@@ -87,6 +88,11 @@ $config['db'] =
'quote_identifiers' => false);
require_once(INSTALLDIR.'/config.php');
+
+if (function_exists('date_default_timezone_set') && $config['site']['timezone']) {
+ date_default_timezone_set($config['site']['timezone']);
+}
+
require_once(INSTALLDIR.'/lib/util.php');
require_once(INSTALLDIR.'/lib/action.php');
require_once(INSTALLDIR.'/lib/theme.php');