Home > php教程 > php手册 > body text

php:PHP 时区设置

WBOY
Release: 2016-06-13 10:54:31
Original
1183 people have browsed it

question:

 

PHP 时区设置date_default_timezone_set(Etc/GMT-8)为什么代表东八区

answer:www.2cto.com

 

date_default_timezone_set("Etc/GMT");     是格林威治标准时间,得到的时间和默认时区是一样的

ate_default_timezone_set("Etc/GMT+8");    比林威治标准时间慢8小时,

date_default_timezone_set("Etc/GMT-8");  东八区,我们比那快8小时所以减8 

 或者使用:date_default_timezone_set('PRC'); 设置中国时区

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 Recommendations
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!