How to set the server time in php: first open the php.ini configuration file; then find the [date.timezone] option; finally set the value of this option to the required time zone, such as [date.timezone= Asia/Shanghai].
Specific method:
(Recommended tutorial: php video tutorial)
First open php .ini configuration file;
Then modify the value of date.timezone to successfully set the time zone of the php server, such as:
Reference value:
(Asia/Chongqing (重庆) Asia/Shanghai (上海) Asia/Urumqi (乌鲁木齐) Asia/Macao (澳门) Asia/Hong_Kong (香港) Asia/Taipei (台北))
Related recommendations: php training
The above is the detailed content of How to set server time in php. For more information, please follow other related articles on the PHP Chinese website!