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