I am getting this error when I transferred my ee site to a new host:

A PHP Error was encountered
Severity: Warning
Message: date_default_timezone_get(): 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 'UTC' for 'GMT/0.0/no DST' instead
Filename: libraries/Core.php
Line Number: 227

Unfortunately in my current hosting solution we are not allowed to adjust the php.ini file and the date setting are set to UTC on the server. I was wondering if there was a way to set this function to be UTC without trying to grab the result from the PHP.ini form.

Because of the nature of the site and the company, I don't have the option to move to a new host or to request this change to PHP.ini.

Thanks for any help you can offer. My version of Expression Engine is v2.2.2

1 Answer 1


Can you try doing that in your .htaccess file, in the root of your site?

php_value date.timezone 'Europe/London'

You should also be able to edit that core EE file, like so:


But doing it in .htaccess will ensure it updates the whole application.

Solution found here. Here are all the timezones that are supported.

  • Thanks so much for the reply. This should work but I have to wait for my administrator to turn on rewrite rules for the server. It did work on my local machine though, so thanks!
    – prosborne
    Feb 12, 2013 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.