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

How to set time zone in php

王林
王林Original
2020-08-05 15:41:162982browse

How to set the time zone in php: 1. Open the php.ini configuration file; 2. Find "; data.timezone =" in the configuration file and uncomment it; 3. Set the time zone as needed, such as "data.timezone = "Asia/Shanghai"".

How to set time zone in php

Specific method:

(Recommended tutorial: php graphic tutorial)

Open first Modify php.ini;

and then find data.timezone in php.ini = remove the ; sign in front of it;

(Video tutorial recommendation: php video tutorial)

Finally set the time zone, such as data.timezone = “Asia/Shanghai”.

The above is the detailed content of How to set time zone 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