Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
d9923c54
Commit
d9923c54
authored
May 10, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #223 from cebe/timezone-fix
better have timezone fix in application
parents
a062edd6
b005b087
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
index.php
apps/bootstrap/index.php
+0
-3
Application.php
yii/base/Application.php
+6
-0
yiic.php
yii/yiic.php
+0
-4
No files found.
apps/bootstrap/index.php
View file @
d9923c54
<?php
if
(
!
ini_get
(
'date.timezone'
))
{
date_default_timezone_set
(
'UTC'
);
}
// comment out the following line to disable debug mode
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
...
...
yii/base/Application.php
View file @
d9923c54
...
...
@@ -85,6 +85,10 @@ class Application extends Module
throw
new
InvalidConfigException
(
'The "basePath" configuration is required.'
);
}
if
(
!
ini_get
(
'date.timezone'
))
{
$this
->
setTimeZone
(
'UTC'
);
}
$this
->
registerErrorHandlers
();
$this
->
registerCoreComponents
();
...
...
@@ -222,6 +226,8 @@ class Application extends Module
/**
* Returns the time zone used by this application.
* This is a simple wrapper of PHP function date_default_timezone_get().
* If time zone is not configured in php.ini or application config,
* it will be set to UTC by default.
* @return string the time zone used by this application.
* @see http://php.net/manual/en/function.date-default-timezone-get.php
*/
...
...
yii/yiic.php
View file @
d9923c54
...
...
@@ -7,10 +7,6 @@
* @license http://www.yiiframework.com/license/
*/
if
(
!
ini_get
(
'date.timezone'
))
{
date_default_timezone_set
(
'UTC'
);
}
defined
(
'YII_DEBUG'
)
or
define
(
'YII_DEBUG'
,
true
);
// fcgi doesn't have STDIN defined by default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment