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.
修正方法:2 種
1. 在 php.ini 裏設定 date.timezone
date_default_timezone_set('Asia/Taipei');
2. 在程式碼裏使用 date_default_timezone_set() 函式
date.timezone = "Asia/Taipei"
Debian :
# vi /etc/php5/apache2/php.ini
CentOS :
# vi /etc/php.ini
References :
PHP 5.3.x 的 strtotime() 時區設定 警告訊息修正 - Tsung's Blog
沒有留言:
張貼留言