Php. ini sets the time zone so that the date function does not show the warningphp page. for the time-to-function processing, Itisnotsafetorelyonthesystemstimezonesettings appears. youare * required * tousethedate. timezonesettingorthedate_default php. ini sets the time zone so that the date function does not display the warning
The php page appears for time-to-function processing:
It is not safe to rely on the system's timezone settings. You are * required * to use the date. timezone setting or the date_default_timezone_set () function.
?
?
Cause and solution:
? ? This is because the time taken by PHP is Greenwich mean time, so there will be a difference between the GMT standard time and the Beijing time by about eight hours. we can solve this problem according to the following method.
Solution:
1. use date_default_timezone_set () in the page header to set my default time zone to Beijing time, that is
Date_default_timezone_set ("PRC ");
?> You can.
2. in php. set date in ini. the value of timezone is PRC, and the value after setting is date. timezone = PRC, cancel the comments of this line of code at the same time, that is, remove the semicolon above.