Home  >  Article  >  Backend Development  >  PHP date_default_timezone_set function China time zone setting

PHP date_default_timezone_set function China time zone setting

WBOY
WBOYOriginal
2016-07-30 13:29:281346browse

date_default_timezone_set() function sets the default time zone used for all date/time functions in the script.

China time zone setting:

It’s okay to set the Chinese time zone to the following four:

<code>date_default_timezone_<span>set</span>(<span>"Asia/Shanghai"</span>);
date_default_timezone_<span>set</span>(<span>"Asia/Chongqing"</span>);
date_Default_timezone_<span>set</span>(<span>"Asia/Harbin"</span>);
date_Default_timezone_<span>set</span>(<span>"PRC"</span>);</code>

Copyright statement: This article is an original article by the blogger and may not be reproduced without the permission of the blogger.

The above introduces the Chinese time zone setting of the PHP date_default_timezone_set function, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
Previous article:Using SOAP in PHPNext article:Using SOAP in PHP