diff --git a/phpgwapi/inc/class.egw_time.inc.php b/phpgwapi/inc/class.egw_time.inc.php index d46eb29151..06f14b26b8 100644 --- a/phpgwapi/inc/class.egw_time.inc.php +++ b/phpgwapi/inc/class.egw_time.inc.php @@ -399,16 +399,13 @@ class egw_time extends DateTime $GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get(); } self::$server_timezone = new DateTimeZone($GLOBALS['egw_info']['server']['server_timezone']); - if (isset($GLOBALS['egw_info']['user']['preferences']['common']['tz'])) + if (!isset($GLOBALS['egw_info']['user']['preferences']['common']['tz'])) { - self::setUserPrefs($GLOBALS['egw_info']['user']['preferences']['common']['tz'], - $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'], - $GLOBALS['egw_info']['user']['preferences']['common']['timeformat']); - } - else - { - self::$user_timezone = clone(self::$server_timezone); + $GLOBALS['egw_info']['user']['preferences']['common']['tz'] = $GLOBALS['egw_info']['server']['server_timezone']; } + self::setUserPrefs($GLOBALS['egw_info']['user']['preferences']['common']['tz'], + $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'], + $GLOBALS['egw_info']['user']['preferences']['common']['timeformat']); } /**