date() [function.date]: It is not safe to rely on the system’s timezone settings

date:星期二, 九月 29th, 2009 at 12:19 上午 Categories:php

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 /home/www/qfclub/user/upimg.php on line 16

最近老出现这种情况

原因在于服务的时区设置吧

刚写玩的程序。

传上去就出现了这个错误

前段时间装 WORDPRESS 也出现了这个错误

查阅了关于WORDPRESS 的说法

把那些关于DATE 的都写成了注释

问题解决了

现在自己的程序。。 不能注释掉。。

找到了解决的办法

date_default_timezone_set(‘UTC’);

设下时区就好了

  • 暂无相关日志

Leave a Reply