Warning: date() [function.date]: 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 …………
有许多Web应用程序弹出这个特定的错误.我可以设置
date_default_timezone_set('America/Los_Angeles');
但这不是我正在寻找的解决方案.
我可以从系统级别做一些事情.它只发生在LOCALHOST而不是实际的生产服务器上.
PHP.ini中的默认设置是date.timezone = America / Los_Angeles
[更新]编辑PHP.ini
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
date.timezone=
.
你仍然需要选择一个实际的价值.你确实没有一个.或者错误的PHP.ini版本(有一个用于CLI,一个用于mod_PHP).