找到PHP安装目录,打开php.ini或者php.ini-development。 查找 date.timezone。 如果前面有分号则去掉分号。 设置如下: date.timezone = PRC 重启Apache服务后即可生效。