Home>Article>Backend Development> How to modify server time in php
How to modify the server time in php: first find and open the php.ini configuration file; then look for "[Date] date.timezone=Europe/Berlin"; finally change "Europe/Berlin" to "Asia/ Shanghai" is enough.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer.
PHP modifies the server's time and time zone
PHP modifies the server's time
1. Find the php.ini configuration file text editor
2. Find [Date ] date.timezone=Europe/Berlin can be searched separately, such as: timezone In short, you need to find this row of data
3. Change it to Europe/Berlin to Asia/Shanghai. If there is no value, add Asia/Shanghai
[Recommended:PHP video tutorial]
The above is the detailed content of How to modify server time in php. For more information, please follow other related articles on the PHP Chinese website!