插件窝 干货文章 laravel报错:Warning: date(): It is not safe to rely on the system's timezone settings.

laravel报错:Warning: date(): It is not safe to rely on the system's timezone settings.

php laravel 报错 503    来源:插件窝    2021-04-15

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.


【解决】

 1. 在 php.ini 里加上date.timezone = "Asia/Shanghai"(去掉前面的;)

 2. 重启服务