1、修改php配置
打开php.ini文件,找到 [date.timezone] 关键词,将 [;date.timezone = ] 改为:
date.timezone = Asia/Shanghai
2、重启php-fpm和nginx
#brew services restart [email protected] #brew services restart nginx
3、查看phpinfo.php是否已生效
在浏览器打开:http://localhost/phpinfo.php,如果配置生效当如下截图所示: