Home > Article > Backend Development > PHP date_default_timezone_set function China time zone setting
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.