我在 MAMP 中运行了一个 phpinfo() 函数,并收到了以下警告,嵌入在 php info 表中:
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 表中反映的实际设置高出三行!
有人可以向我解释如何解决此问题吗?
您确定.ini文件中的时区周围没有引号?
日期.时区 = 美国/New_York
http://www.php.net/manual/en/timezones.america.php#85815