diff options
author | Mike Cochrane <mikec@mikenz.geek.nz> | 2008-07-20 10:13:25 -0400 |
---|---|---|
committer | Mike Cochrane <mikec@mikenz.geek.nz> | 2008-07-20 10:13:25 -0400 |
commit | 88717d88057ac0c51a2d7842305c808691404e6f (patch) | |
tree | 891a722a92bbc9e91799367cbbd0506f6725bdea /lib/common.php | |
parent | 060fecf5ec59202c5eaf3448f9723a81820d5735 (diff) |
User definable timezones. Work in UTC internally and display per user/site default. http://laconi.ca/PITS/00011
darcs-hash:20080720141325-533db-87cb60501434c9dc0ac13716ba5d8b17754431f5.gz
Diffstat (limited to 'lib/common.php')
-rw-r--r-- | lib/common.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/common.php b/lib/common.php index 04242432c..b4c16660f 100644 --- a/lib/common.php +++ b/lib/common.php @@ -51,7 +51,7 @@ $config = 'locale_path' => './locale', 'language' => 'en_US', 'languages' => get_all_languages(), - 'email' => + 'email' => array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : NULL, 'broughtby' => NULL, 'timezone' => 'UTC', @@ -101,8 +101,9 @@ $config['db'] = require_once(INSTALLDIR.'/config.php'); -if (function_exists('date_default_timezone_set') && $config['site']['timezone']) { - date_default_timezone_set($config['site']['timezone']); +if (function_exists('date_default_timezone_set')) { + /* Work internally in UTC */ + date_default_timezone_set('UTC'); } require_once(INSTALLDIR.'/lib/util.php'); |