PHP5.1 using the date function for the above version will encounter such warning:
PHP warning:date () [function.date]: It is not safe to 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 the those methods and you is still getting this warning, your most likely misspelled The timezone identifier. We selected ' UTC ' for ' 8.0/no DST ' instead in '
This means that the time zone in PHP is not set or the function used is incorrect!
You can try to find PHP.ini (config files) in the installation file of PHP, then ctrl+f find "date.timezone", (remember the second file), the configuration file shows "; date.timez/span>"This sentence needs to be modified, to be preceded , removed, and then added to the PRCafter = , This means that the time zone feature is turned on and set to the China (PRC) time zone!
Finally, be sure to restart the server (Apache, or IIS), and then the problem is solved!!!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The above describes the use of the PHP51 version of the date function is the way to deal with the warning, including the content, I hope to be interested in PHP tutorial friends helpful.