Home > Backend Development > PHP Tutorial > php:PHP 时区设立

php:PHP 时区设立

WBOY
Release: 2016-06-13 12:54:21
Original
1061 people have browsed it

php:PHP 时区设置

question:

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

answer:

<strong>date_default_timezone_set("Etc/GMT"); </strong>    是格林威治标准时间,得到的时间和默认时区是一样的
<strong>ate_default_timezone_set("Etc/GMT+8"); </strong>   比林威治标准时间慢8小时,
<strong>date_default_timezone_set("Etc/GMT-8");</strong>  东八区,我们比那快8小时所以减8 
 或者使用:<strong>date_default_timezone_set('PRC'); </strong>设置中国时区
Copy after login

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