码迷,mamicode.com
首页 > 其他好文 > 详细

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

时间:2018-12-17 11:42:17      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:conf   method   safe   class   错误   settings   warning   date()   zone   

错误截图

技术分享图片

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 C:\phpStudy\WWW\yii\common\config\bootstrap.php on line 32

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 C:\phpStudy\WWW\yii\common\config\bootstrap.php on line 33

  

具体解决方法:

 

修改php.ini配置文件

 

在php.ini配置文件中找到:  ;date.timezone = ,把前面的分号去掉在 “=”后面加上时区。

 

date.timezone = "Asia/Shanghai"

或者

date.timezone="Asia/Chongqing"

 

修改完后,重启apache即可。

技术分享图片

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

标签:conf   method   safe   class   错误   settings   warning   date()   zone   

原文地址:https://www.cnblogs.com/zhangyouwu/p/10129865.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!