Home  >  Article  >  Backend Development  >  How to modify server time in php

How to modify server time in php

藏色散人
藏色散人Original
2021-03-03 09:19:202595browse

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.

How to modify server time in php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn