Merge pull request #3747 from Icinga/bugfix/setuptimezone
ApplicationBootstrap#setupTimezone(): ensure a vaild default timezone to be set in any case
This commit is contained in:
commit
b50091fc21
|
@ -618,11 +618,7 @@ abstract class ApplicationBootstrap
|
|||
{
|
||||
$timezone = $this->detectTimeZone();
|
||||
if ($timezone === null || @date_default_timezone_set($timezone) === false) {
|
||||
$timezone = @date_default_timezone_get();
|
||||
if ($timezone === false) {
|
||||
$timezone = 'UTC';
|
||||
date_default_timezone_set($timezone);
|
||||
}
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue