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错误
有以下几种方案可解决该问题:
- 使用date_default_timezone_set()设置 date_default_timezone_set('PRC');
- ini_set('date.timezone','Asia/Shanghai');
- 修改错误级别配置(不推荐)
- 修改php.ini,显式设置date.timezone=PRC