Home  >  Article  >  Backend Development  >  Analysis of date.timezone settings in php.ini_PHP tutorial

Analysis of date.timezone settings in php.ini_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:25:34655browse

Although I know that this parameter means "People's Republic of China", there is no such parameter in the official documents. There are only parameters such as Asia/Shanghai, Asia/Hong_Kong, etc. Why can it be set to RPC here? Can anyone give me some advice? Where are the parameters? It seems that there is indeed no such parameter in the official documents, I am confused. Generally, it is set to Asia/Shanghai

I have been using xampp for a short time. Today, in order to correct the php acquisition function, it is to obtain the server time.

Since php5.1.0, the date.timezone option has been added to php.ini, which is turned off by default. The displayed time is all Greenwich Mean Time, which is exactly 8 hours different from Beijing time.

Method found online:

Modify the php.ini file, look for ;date.timezone =, remove the semicolon in front and add the time zone after "=".

For example: Asia/Chongqing (Chongqing), Asia/Shanghai (Shanghai), Asia/Urumqi (Urumqi), Asia/Macao (Macau), Asia/Hong_Kong (Hong Kong), Asia/Taipei (Taipei), PRC

example
;date.timezone =
is changed to:
date.timezone = Asia/Shanghai

The method is very simple. But under xampp, changing the php/php.ini file has no effect. Later, I searched online and found out that damn xampp, put php.ini under apache/bin and modify the php.ini in it to be useful.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324088.htmlTechArticleAlthough I know that this parameter means "People's Republic of China", there is no such parameter in the official document, only Asia/Shanghai, Asia/Hong_Kong and other parameters, why are they here...
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