mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
"fixed warning in setup and correctly reading config first"
This commit is contained in:
parent
a0e1a238dd
commit
2d93ce28cc
@ -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']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user