date() [<a href='function.date'>function.date</a>]: 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

 

 

这是由于调用date时,若timezone设置不正确所产生的E_NOTICE|E_WARNING错误

有以下几种方案可解决该问题:

  1. 使用date_default_timezone_set()设置 date_default_timezone_set('PRC');
  2. ini_set('date.timezone','Asia/Shanghai');
  3. 修改错误级别配置(不推荐)
  4. 修改php.ini,显式设置date.timezone=PRC

 

相关文章:

  • 2021-06-18
  • 2021-07-11
  • 2022-02-14
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2022-03-07
  • 2021-09-28
  • 2021-06-09
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案