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

This commit is contained in:
Ralf Becker 2009-12-24 01:48:51 +00:00
parent 7bfa59767c
commit 08d5ce1f30

View File

@ -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']);
}
/**