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

How to set server time in php

王林
王林 Original
2020-09-29 11:28:10 2580browse

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].

How to set server time in php

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:

How to set server time in php

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!

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