Browse Source

Merge pull request #210 from bwoester/fix-209-default-timezone

Fix issue #209 default timezone
tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
71897b4b76
  1. 7
      yii/base/Application.php

7
yii/base/Application.php

@ -85,6 +85,13 @@ class Application extends Module
throw new InvalidConfigException('The "basePath" configuration is required.'); 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')) { if (!ini_get('date.timezone')) {
$this->setTimeZone('UTC'); $this->setTimeZone('UTC');
} }

Loading…
Cancel
Save