PHPのstrtotime()のエラーがApacheのログに記録される

Apacheのログに下記のPHP WarnningでStrtotime()のエラーが記録される。

PHP Warning:  strtotime(): 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.

対応は、php.iniにtimezoneの設定がされていなかったので、上記のエラーに従い、UTCで設定を追加した。

date.timezone = UTC

設定後、Apacheを再起動して完了。

スポンサーリンク

シェアする

  • このエントリーをはてなブックマークに追加

フォローする