0

我在 MAMP 中运行 phpinfo() 函数,并收到以下警告,嵌入在 php 信息表中:

Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /Applications/MAMP/bin/mamp/phpinfo.php on line 2 

php.ini 文件中的 date.timezone 设置为“America/New_York”,警告仅比 phpinfo 表中反映的实际设置高出三行!

有人可以向我解释如何解决这个问题吗?

4

1 回答 1

0

您确定 .ini 文件中的时区周围没有引号吗?

date.timezone = America/New_York

http://www.php.net/manual/en/timezones.america.php#85815

于 2012-11-28T06:47:23.530 回答