zend server报错:It is not safe to rely on the system’s timezone settings

最近更新了一下zend server,发现打开网站的时候,出现以下错误提示:

Warning: main() [function.main]: 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 ‘UTC’ for ’8.0/no DST’ instead in

于是根据错误提示,在网站页面中加入以下代码:

date_default_timezone_set(‘PRC’);

可是在打开其他网站的时候,发现也有这样的提示,于是想到应该是php.ini中的设置有问题,打开php.ini,查找timezone,发现以下设置:

date.timezone=RPC

于是改为:

date.timezone=PRC

还有一种可能就是php.ini中没有设置默认值,如

;date.timezone=

这时,只需要去掉“;”并加上PRC即可。

重启apache之后恢复正常。

RPC: 远程过程调用协议

PRC: 中华人民共和国

 

您可能感兴趣的文章

您的所有隐私均只有您自己才知道。带*号为必填项

*

*

评论内容: