PHP Error: It is not safe to rely on the system's timezone settings

PHP Error: 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

PHP Error

While starting the Web page we are getting following error:

You need to put the timezone in a configuration line in your php.ini file. You should have a block like this in your php.ini file:

[root@zabbixserver httpd]#  grep -i timezone /etc/php.ini
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = UTC
[root@zabbixserver httpd]#

Then restart your httpd service:

systemctl restart httpd

0 Comments