たまに急にやってくるボリューム修正案件が発生して対応してたら、PHPファイルで地味に下記のエラーが出てることに気付いた。

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.timezone = “Asia/Tokyo”

をPHPプログラム内に書いてあげたら消えた。
この案件は22店舗あって、他の同じファイルではエラーは起きていないし、今までも特段出てなかった気がするのだけど、なんで急に出てきたのだーそういうの多いな。他でもデフォルトで書いておくべきだろうか・・

c.sakyou

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA