fixed not used user date and time format, if no timezone set

This commit is contained in:
Ralf Becker 2009-12-24 01:53:27 +00:00
parent 8b24fa4ed3
commit 9df8431a61

View File

@ -399,16 +399,13 @@ class egw_time extends DateTime
$GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get(); $GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get();
} }
self::$server_timezone = new DateTimeZone($GLOBALS['egw_info']['server']['server_timezone']); 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']['tz'] = $GLOBALS['egw_info']['server']['server_timezone'];
$GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],
$GLOBALS['egw_info']['user']['preferences']['common']['timeformat']);
}
else
{
self::$user_timezone = clone(self::$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']);
} }
/** /**