Tag Archives: error

Fix timezone settings for “Strict Standards: strtotime()” error in CakePHP

When i installed CakePHP on a hostet webspace (e.g. 1und1) i received this error message:

Strict Standards: strtotime(): 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 ‘Europe/Berlin’ for ‘CEST/2.0/DST’ instead in /lib/Cake/Cache/CacheEngine.php on line 60

It seems that there are at least 2 solutions for that issue:

  1. adding this line of code into app/Config/core.php
    date_default_timezone_set('Europe/London');

    This one worked fine for me.

  2. adding/changing this line in your php.ini
    [Date]
    date.timezone = Europe/Berlin

    This did not work for me, but therefore this seems to be a solution for other users, i thought i should put it in here, too.