phpinfo在MAMP中显示date.timezone警告

phpinfo在MAMP中显示date.timezone警告,php,timezone,mamp,phpinfo,Php,Timezone,Mamp,Phpinfo,我在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 cas

我在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文件中没有关于时区的引号吗

date.timezone=美国/纽约


检查php.ini的路径,有时,如果在cli或web上,您使用的php.ini并不相同。谢谢@artragis!在哪里可以找到MAMP实际使用的php.ini的路径?在cli中,可以使用php--ini,在web上,使用phpinfo()函数,它会显示为you。我检查了。这是正确的php.ini。此外,实际的phpinfo显示date.timezone设置为正确的值。但是,它仍然显示警告!非常感谢。我用单引号、双引号和无引号进行了尝试,每次都重新启动服务器,但仍然收到相同的警告。它应该是带引号的,不是吗?不。根据文档,它在.ini文件中没有引号,但是在脚本中声明时使用双引号,如果你有一个“全局”的话,你也可以尝试使用双引号。php包含了你所有页面都在拉的某个文件。正如我所说,我尝试过带引号或不带引号,单引号和双引号,但警告仍然无效。希望您能有更多的见解。