こんなエラーが出たら、タイム・ゾーンの設定をしなければいけない。
いわゆる、タイム・ゾーンの設定ができていないということだ。
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.
設定するには、日付・時刻の関数である
date_default_timezone_setを使う。
date_default_timezone_set('Asia/Tokyo');
PHPではなく設定ファイルで設定するならphp.iniで下記のように設定できる。
date.timezone = "Asia/Tokyo"
Mysqlで日付のカラムを使用する時にPHPでこれらの設定が必要ですね。