PHP Warning: 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.

If you are stuck with this error here is the workaround for the same.


Resolution :-

You have to tell PHP what your system time zone is. You can edit your php.ini file and put your timezone (Use whatever timezone is appropriate for you)in front of date.timezone parameter as shown below.

Edit the php.ini file using vi Editor and search for date.timezone

#vi /etc/php.ini




If you are facing this same issue on WORDPRESS SITE and if you don’t have access to the php.ini, adding this to the top of the wp-config.php file will do much the same thing:





Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *