It is not safe to rely on the system’s timezone settings

来源:互联网 发布:java导出excel模板 编辑:程序博客网 时间:2024/05/21 14:07

在 Cent OS 下,使用 php 的 date() 函数产生警告:

It is not safe to rely on the system’s timezone settings

解决方案是修改php.ini

date.timezone = PRC

或者

date.timezone = "Asia/Shanghai"

好吧,这些方法都来自互联网,可是最最关键的一点是修改完后要重启服务器才能生效(几乎没人提及,特别记录下来)



原创粉丝点击