错误Warning: date() ... timezone settings
2010-02-25 14:39
459 查看
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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 365 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 367 Warning: strtotime() [function.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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /home1/vhost/vh414831/www/shu/model/user.class.php on line 367
今天在运行PHP应用时,报了上面的警告,
出现这个可能是以下原因
1.如果装xampp,可能是xampp没装好或者有问题,需要重装
2.php 5.3也可能出这个问题,需要修改php.ini文件 找到date.timezone
将它的改为 date.timezone=utc 将前面的分号去掉,重启服务器
或者在index.php中加上 date_default_timezone_set('UTC');
3.可以将index.php里面的
error_reporting(7);
改为
error_reporting(0);
即可避免它们的出现。
相关文章推荐
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to us
- PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
- PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- PHP 日期问题 PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- Cacti编译安装错误: Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- "PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- php首次使用date函数 遇到警告:Warning:date():It is not safe to rely on the system's timezone settings.You...
- 关于php中Warning: date(): It is not safe to rely on the system's timezone settings.解决
- php Warning:date(): It is not safe to rely on the system's timezone settings
- yii产生warning date(): It is not safe to rely on the system's timezone settings
- Warning: date(): It is not safe to rely on the system's timezone settings
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- php Warning: date(): It is not safe to rely on the system's timezone settings.
- Warning: strftime(): It is not safe to rely on the system's timezone settings.