Bootstrap/timezone: do not enforce config
The current way forces people running a correctly configured PHP to configure timezone once again in Icinga Web. We want LESS config, so this tries to fix this.
This commit is contained in:
parent
f498cd0c81
commit
559457f730
|
@ -457,7 +457,11 @@ abstract class ApplicationBootstrap
|
|||
*/
|
||||
protected function setupTimezone()
|
||||
{
|
||||
$timeZoneString = $this->config->global !== null ? $this->config->global->get('timezone', 'UTC') : 'UTC';
|
||||
$default = @date_default_timezone_get();
|
||||
if (! $default) {
|
||||
$default = 'UTC';
|
||||
}
|
||||
$timeZoneString = $this->config->global !== null ? $this->config->global->get('timezone', $default) : $default;
|
||||
date_default_timezone_set($timeZoneString);
|
||||
DateTimeFactory::setConfig(array('timezone' => $timeZoneString));
|
||||
return $this;
|
||||
|
|
Loading…
Reference in New Issue