PHP Warning: date() [funct…

原文地址:PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone 作者:ToBe

Warning: 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

你可能感兴趣的:(PHP Warning: date() [funct…)