mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:39:07 +01:00
"fixed warning in setup and correctly reading config first"
This commit is contained in:
parent
a0e1a238dd
commit
2d93ce28cc
@ -398,11 +398,19 @@ class egw_time extends DateTime
|
||||
if (empty($GLOBALS['egw_info']['server']['server_timezone']))
|
||||
{
|
||||
$config = new config('phpgwapi');
|
||||
$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']);
|
||||
|
||||
self::$server_timezone = new DateTimeZone($GLOBALS['egw_info']['server']['server_timezone']);
|
||||
|
Loading…
Reference in New Issue
Block a user