您的位置:首页 > 编程语言 > PHP开发

PHP Warning: date() [funct…

2014-10-31 16:48 344 查看
原文地址:PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone作者:ToBeWarning: strtotime(): 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 the timezone 'UTC' for now, but please set
date.timezone to select your timezone. in
/usr/local/apache2/htdocs/cacti/include/global_constants.php
on line 165

Warning
: 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 the
timezone 'UTC' for now, but please set date.timezone to select your
timezone. in
/usr/local/apache2/htdocs/cacti/include/global_constants.php
on line 165

 

解决: 

在php.ini中设置date.timezone的值为PRC,设置好以后的为:date.timezone =
PRC,同时取消这一行代码的注释,即去掉前面的分号。

再重启apache
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐