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,10 +398,18 @@ class egw_time extends DateTime
|
|||||||
if (empty($GLOBALS['egw_info']['server']['server_timezone']))
|
if (empty($GLOBALS['egw_info']['server']['server_timezone']))
|
||||||
{
|
{
|
||||||
$config = new config('phpgwapi');
|
$config = new config('phpgwapi');
|
||||||
$config->save_value('server_timezone',
|
$config->read_repository();
|
||||||
$GLOBALS['egw_info']['server']['server_timezone'] = date_default_timezone_get());
|
if ($config->config_data['server_timezone'])
|
||||||
$config->save_repository();
|
{
|
||||||
error_log(__METHOD__."() stored server_timezone=".date_default_timezone_get());
|
$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']);
|
date_default_timezone_set($GLOBALS['egw_info']['server']['server_timezone']);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user