There was a warning when PHP was debugged:
It's not safe for rely on the system workaround, in fact, the time zone setting is incorrect, this article provides 3 ways to solve this problem.
In fact, starting with PHP 5.1.0, when using a function such as date (), if the TIMEZONE setting is not correct, each time function is called, it will produce e_notice or e_warning information, and in PHP, Date.timezone This option is off by default, regardless of the PHP command is Greenwich Mean time, but PHP5.3 if you do not set a part of the time class function will be forced to throw the error.
PS: Now, because most people use vps/cloud host, the environment that needs to be configured by oneself is more likely to appear this situation.
Recommendation: not familiar with the PHP environment or with a more mature one-click Install package Bar.
Method 1:
(The best way) in php.ini to find the Date.timezone entry, set date.timezone = "Asia/shanghai", restart the environment is OK.
Method 2:
When these time functions are needed, add Date_default_timezone_set ("PRC") to the page;
Method 3:
In the header plus set the time zone Ini_set (' Date.timezone ', ' Asia/shanghai ');
Error code:
warning: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 ' asia/chongqing ' for ' cst/8.0/no DST ' instead
warning:strtotime (): 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 ' asia/chongqing ' for ' cst/8.0/no DST ' instead
warning:date_default_timezone_get (): 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 ' asia/chongqing ' for ' cst/8.0/no DST ' instead in <b>/home/ftp/n/nimaboke/include/lib/ function.base.php
It is not safe to rely on the system solution