**
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. in file /www/wwwroot/yyktt.net/Workerman/Worker.php on line 2082 Workerman[start.php] is stopping …
**
提示错误:说是时间不安全,选择了utc的时区,需要设置一下timezone
我试过两种方法
第一种:在执行date()方法前设置时区,代码实现 ini_set(‘date.timezone’,‘Asia/Shanghai’);
第二种:设置php-ini文件 这种方式推荐使用
找到php.ini文件打开它,看看里面有没有date.timezone把前面的;去掉
再添加一行date_default_timezone_set(‘UTC’);
重启服务器,完成;