diff --git a/yii/base/Application.php b/yii/base/Application.php index d6096ad..6e82e9a 100644 --- a/yii/base/Application.php +++ b/yii/base/Application.php @@ -84,6 +84,13 @@ class Application extends Module } else { throw new InvalidConfigException('The "basePath" configuration is required.'); } + + if (isset($config['timeZone'])) { + $this->setTimeZone($config['timeZone']); + unset($config['timeZone']); + } elseif (!ini_get('date.timezone')) { + $this->setTimeZone('UTC'); + } if (!ini_get('date.timezone')) { $this->setTimeZone('UTC');