DateTime::__construct(): It is not safe to rely on the system’s timezone settings.

If your getting the above error, then you have a misconfiguration in your php.ini file, this is very easy to remedy. Firstly find out which php.ini file your setup is using, you can do this using phpinfo(), just echo that out on its own in a plain php test script, like so:

Then locate where it mentions what php.ini you are using (do a page search on the output), and then load that php.ini file up and look for the line that states:

‘date.timezone’

it may be commented out like this ;date.timezone. Once you find it, set it to your region and capitol, as i have here:

date.timezone = ‘Europe/London’
And ensure that the semicolon is not at the beginning of this line. Save the file then restart your web servers Apache/PHP and the following error you saw should go away.

Enjoy.

5 thoughts on DateTime::__construct(): It is not safe to rely on the system’s timezone settings.

  1. It’s amazing in support of me to have a site, which is helpful in favor of my
    know-how. thanks admin

    my website Cara Setting WI-FI pada Laptop dan PC – Pedro,

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">