diff --git a/phpgwapi/inc/class.egw_time.inc.php b/phpgwapi/inc/class.egw_time.inc.php index 1d261fc7a0..85bdb89da7 100644 --- a/phpgwapi/inc/class.egw_time.inc.php +++ b/phpgwapi/inc/class.egw_time.inc.php @@ -398,10 +398,18 @@ class egw_time extends DateTime if (empty($GLOBALS['egw_info']['server']['server_timezone'])) { $config = new config('phpgwapi'); - $config->save_value('server_timezone', - $GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get()); - $config->save_repository(); - error_log(__METHOD__."() stored server_timezone=".date_default_timezone_get()); + $config->read_repository(); + if ($config->config_data['server_timezone']) + { + $GLOBALS['egw_info']['server']['server_timezone'] = $config->config_data['server_timezone']; + } + else + { + $config->save_value('server_timezone', + $GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get()); + $config->save_repository(); + error_log(__METHOD__."() stored server_timezone=".date_default_timezone_get()); + } } date_default_timezone_set($GLOBALS['egw_info']['server']['server_timezone']);