Php. ini time zone problem php. ini set date. timezone = Asia/Chongqing, but the difference is still 8 minutes. In phpinfo, date. timezoneAsia/ChongqingAsia/chongqingdefadefatimezoneetc/GMT + 0 are all set in php. dat php. ini time zone problems.
Php. ini is set
Date. timezone = Asia/Chongqing
However, the difference is 8 minutes.
Phpinfo:
Date. timezoneAsia/ChongqingAsia/Chongqing
Default timezone Etc/GMT + 0
Previously set with php, date_default_timezone_set ('etc/GMT-8 ');
There is no problem, but I don't want to do this if I want to change the site one by one.
I would like to ask how to correct php. ini. thank you.
------ Solution --------------------
I checked it for you. I don't know if you have read this post.
Http://blog.csdn.net/hzhuoquan/article/details/4957836
Generally, a global time zone macro variable is added to the config file of the website.
------ Solution --------------------
It's always set in php ....
------ Solution --------------------
Date_default_timezone_set ('Asia/Shanghai ');
That's all you have to do.
------ Solution --------------------
First confirm, what is your php version?
------ Solution --------------------
Date. timezone = Asia/Shanghai; is Beijing time different for Shanghai?
Date. timezone = Asia/Chongqing; Does Chongqing use Beijing time?
Date. timezone = PRC; People's Republic of China
------ Solution --------------------
Try date. timezone = Etc/GMT-8
Related constants may not be compiled.
------ Solution --------------------
How do you have Default
My PHP Version 5.3.1
[Date]
; Defines the default timezone used by the date functions
Http://php.net/date.timezone
; Date. timezone = "UTC"
Date. timezone = "Etc/GMT-8"
I set it
After apache is restarted
Phpinfo is displayed
Date
Date/time support enabled
"Olson" Timezone Database Version 2009.18
Timezone Database internal
Default timezone Etc/GMT-8
Echo"
";
print_r(getdate());
echo "
";
The output is
Array
(
[Seconds] => 38
[Minutes] => 53
[Hours] => 13
[Mday] => 3
[Wday] => 5
[Mon] => 8
[Year] = & gt; 2012
[Yday] = & gt; 215
[Weekday] => Friday
[Month] => August
[0] = & gt; 1343973218
)
You can change the file either by mistake or by changing the file. if you change the file more, apache is not restarted. if you do not restart the file, apache is too bad.
------ Solution --------------------
Cache? Who else is involved in this? Nginx is busier than apache.
The two keywords of massive search: "Default timezone", "Etc/GMT + 0"