How to set server time in php

王林
Release: 2023-03-06 09:56:01
Original
2627 people have browsed it

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 (台北))
Copy after login

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!

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!