解决zabbix时钟报错问题

最近更新

 

错误提示

DateTime::__construct(): 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.




系统环境

CentOS Linux release 7.6.1810 (Core)

Zabbix 4.2.8

 

解决方法

1.修改时区配置

vi /etc/httpd/conf.d/zabbix.conf

php_value date.timezone Asia/Shanghai

 

2.重启WEB服务器和zabbix服务器

systemctl restart httpd

systemctl restart zabbix-server