1.1 It isn't safe to rely on the system ' s timezone settings1.1.1 phenomenon
To run the PHP application, the following error message appears:
Date (): It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected the timezone ' UTC ' for now, but please set Date.timezone to select your timezone. |
1.1.2 Reasons
This is because the time taken by PHP is Greenwich Mean time, so it is about 8 hours or so of Greenwich Standard Time and Beijing time for your local time.
1.1.3 Solution
We can solve the following methods as follows:
1. Use Date_default_timezone_set () in the header to set my default time zone to Beijing time, i.e. <?phpdate_default_timezone_set ("PRC"); > It's ready.
2, set the value of Date.timezone in php.ini to PRC, set the following as: DATE.TIMEZONE=PRC, while canceling the comment of this line of code, that is, to remove the preceding semicolon is OK.
This article is from the "Rainman" blog, make sure to keep this source http://lancelot.blog.51cto.com/393579/1772959
PHP problem--it is not safe for rely on the system ' s