Home > Backend Development > PHP Problem > How to modify server time in php

How to modify server time in php

藏色散人
Release: 2023-03-08 11:54:01
Original
2695 people have browsed it

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template