PHP: time zone. PHP on the time zone issue, PHP time zone issues recently learned PHP found that the formatting timestamp in PHP is 8 hours later than the Beijing time, online search found that the original time zone is incorrect, solve the PHP time zone issue.
Recently, I found that the formatting timestamp in PHP is 8 hours later than that in Beijing time. I found that the time zone was incorrect during online search. the solution is as follows:
1. change data. timezone = PRC in the php. ini file permanently. this is China time. It takes effect after you restart the Apache service. 2. add ini_set ('date. timezone ', 'Asia/Shanghai'); or data_default_timezone_set ('prc'); // The date_default_timezone_set () function is used to set the default time zone of all date/time functions in the script.
Parse recently found that the formatting timestamp in PHP is eight hours later than that in Beijing time. it was found that the time zone was incorrect during online search...