国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

What should I do if the time zone setting in php7.1.4 is invalid?
高洛峰
高洛峰 2017-05-16 13:00:30
0
3
1751

After upgrading PHP to 7.1.4 on Mac, after configuring date.timezone = PRC in the php.ini file and restarting apache, the displayed time is still European time. Question: How does the time zone setting of this version take effect?

For example:

The current time is actually: 1:04:15 pm on May 9, 2017; exactly 8 hours different. 
高洛峰
高洛峰

擁有18年軟件開發(fā)和IT教學(xué)經(jīng)驗。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項目經(jīng)理、高級軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...

reply all(3)
PHPzhong

It has nothing to do with PHP 7.1. It has been like this since 5.1;
I tested it specifically after you just said it
Default timezone The default is UTC;
phpinfo output must be UTC;

Please make sure you are indeed modifying the current version of php.ini

Open PHPini ctrl+g line 925 and modify it to:
date.timezone = "PRC";

Or set it globally

date_default_timezone_set('PRC');

echo date('Y-m-d H:i:s');
                          

Running environment 7.0.24

by liberxue

PHPzhong

Make sure the modified configuration file php.ini is the path displayed by phpinfo? There are also modifications that require restarting apache

左手右手慢動作
  • List items

The php.ini path is definitely correct, but it is invalid after modification.

  • List items

Use: date_default_timezone_set('PRC') can take effect, but it must be set every time.


Running version: PHP7.1.4

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template