From 88717d88057ac0c51a2d7842305c808691404e6f Mon Sep 17 00:00:00 2001 From: Mike Cochrane Date: Sun, 20 Jul 2008 10:13:25 -0400 Subject: User definable timezones. Work in UTC internally and display per user/site default. http://laconi.ca/PITS/00011 darcs-hash:20080720141325-533db-87cb60501434c9dc0ac13716ba5d8b17754431f5.gz --- lib/common.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/common.php') 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'); -- cgit v1.2.3-54-g00ecf