当前位置: 首页 > PHP, 工作 > 正文

解决php的It is not safe to rely on the system’s timezone settings的问题

遇到

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

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

解决办法,在php.ini里加上
date.timezone = “Asia/Shanghai”

本文固定链接: http://www.chenruixuan.com/archives/331.html | 天宝寺||陈瑞轩

该日志由 陈瑞轩 于2014年05月07日发表在 PHP, 工作 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: 解决php的It is not safe to rely on the system’s timezone settings的问题 | 天宝寺||陈瑞轩

解决php的It is not safe to rely on the system’s timezone settings的问题:等您坐沙发呢!

发表评论

快捷键:Ctrl+Enter