Commit b8ad3567 by Benjamin Wöster

set application timezone early in application constructor, set default of UTC if…

set application timezone early in application constructor, set default of UTC if no timezone is configured at all (not in app config nor in php.ini)
parent 810d232e
......@@ -85,6 +85,10 @@ class Application extends Module
throw new InvalidConfigException('The "basePath" configuration is required.');
}
if (isset($config['timeZone']) || !ini_get('date.timezone')) {
$this->setTimeZone( \yii\helpers\ArrayHelper::remove($config,'timeZone','UTC') );
}
$this->registerErrorHandlers();
$this->registerCoreComponents();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment