PHP.ini Time Zone related issues

Source: Internet
Author: User
Tags phpinfo
PHP.ini Time Zone issues
PHP.ini Set up
Date.timezone = asia/chongqing
But it's still 8 minutes.


Phpinfo have seen
Date.timezoneasia/chongqingasia/chongqing
Default TimeZone etc/gmt+0



Before all is set with PHP, Date_default_timezone_set (' etc/gmt-8 ');
No problem, but it's going to be a stand to change, don't want to do it

Want to ask PHP.ini how to change the right, thank you.




------Solution--------------------
I have checked for you, I do not know this post did you read it?
http://blog.csdn.net/hzhuoquan/article/details/4957836

Usually add a global time zone macro variable in the config file of the website.

------Solution--------------------
has always been set in PHP by the passing ....
------Solution--------------------
Date_default_timezone_set (' Asia/shanghai ');
That's all you can do.
------Solution--------------------
Check first, what is your PHP version?
------Solution--------------------
Date.timezone = Asia/shanghai; does Shanghai use Beijing as a different?
Date.timezone = asia/chongqing; Chongqing is not the same as the use of Beijing?
Date.timezone = PRC, PRC

------Solution--------------------
Then try Date.timezone = etc/gmt-8
Probably the relevant constants have not been compiled in
------Solution--------------------
How do you have default?
Mine is PHP Version 5.3.1.
[Date]
; Defines the default timezone used by the date functions
; Http://php.net/date.timezone
;d Ate.timezone = "UTC"
Date.timezone = "Etc/gmt-8"

I set this up as a
After restarting Apache
Phpinfo shown as

Date
Date/time Support Enabled
"Olson" Timezone Database Version 2009.18
Timezone Database Internal
Default TimeZone Etc/gmt-8

echo "
";
Print_r (GETDATE ());
echo "
";
Output to
Array
(
[Seconds] = 38
[Minutes] = 53
[Hours] = 13
[Mday] = 3
[Wday] = 5
[Mon] = 8
[Year] = 2012
[Yday] = 215
[Weekday] = Friday
[Month] = August
[0] = 1343973218
)
You do not change the wrong file, is to change more, not to change more is Apache did not restart, not restart is the character is too bad



------Solution--------------------
Cache? Who else is involved in this? Nginx is busier than Apache may
Massive manhunt for these two key words "Default timezone", "etc/gmt+0"
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.