phpでDateTime関数を使用しようとしてエラーが出る場合の対処方法【Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__construct():】

Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__construct(): 

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.
‘ in /home/XXX/www/XXX.php:XXX Stack trace:
#0 /home/XXX/XXX.php(XXX):
DateTime->__construct(’20XX/XX/XX’) #1 {main} thrown in /home/XXX/XXX.php on line XXX



date.timezone = Asia/Tokyo




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