How to set the time zone in php: 1. Open the php.ini configuration file; 2. Find "; data.timezone =" in the configuration file and uncomment it; 3. Set the time zone as needed, such as "data.timezone = "Asia/Shanghai"".
Specific method:
(Recommended tutorial: php graphic tutorial)
Open first Modify php.ini;
and then find data.timezone in php.ini = remove the ; sign in front of it;
(Video tutorial recommendation: php video tutorial)
Finally set the time zone, such as data.timezone = “Asia/Shanghai”.
The above is the detailed content of How to set time zone in php. For more information, please follow other related articles on the PHP Chinese website!