Skip to content

Warning: strftime(): It is not safe to rely on the system's timezone settings.

edited June 2013 in Troubleshooting

Recently during a routine update to Plesk, the server that I use for Sendy suffered an issue. You troubleshooted for me and we solved a problem whereby I could not log in to Sendy, and with your advice my hosting company has now been able to make it so that I can log in.

However, from the moment that I have been able to log in, I'm getting these errors from autoresponders.php which is triggered each minute via cron:

Warning: strftime(): 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 /var/www/vhosts/example.com/another-example.com/autoresponders.php on line 60

I also get the same error but the only difference is that the last line reads:

/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 61
/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 62
/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 63
/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 64
/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 65
/var/www/vhosts/example.com/another-example.com/autoresponders.php on line 163 - this error about 100 times

I have set the timezone in Sendy to Europe/London

In the database my user (in fact all users) has 'Europe/London' in the timezone field of the login table

Any thoughts would be most welcome.

Thanks.

Comments

  • BenBen
    edited June 2013

    Hi Nathan,

    It's strange that I don't get this warning. Can you try adding the following line after line 47 in autoresponders.php:

    date_default_timezone_set($user_timezone);

    Thanks.

    Ben

  • Turns out that 'Date' in php.ini on the server was set incorrectly, so setting it to 'Europe/London' in my case did the trick.

    Thanks for the advice though...

This discussion has been closed.