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在使用时间,日期等时候会出现这个问题的原因是当前的时区和默认的时区不一致导致的,默认时区是格林威治时区,我们需要根据自己的时区设置,在php.ini里加上找到date.timezone项,设置date.timezone = "Asia/Shanghai",值为所在区域对应的时区。重启环境就可以了。