1

running CiviCRM 4.7.8 WordPress

The following is appearing in the error_log whenever cron.php runs:

[Fri Jun 24 16:01:06 2016] [error] [client ...] 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. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /.../wp-content/plugins/civicrm/civicrm/CRM/Mailing/Event/BAO/Opened.php on line 58

Is anyone aware which class is supposed to be responsible for setting the timezone in this case?

1

That message indicates that the timezone variable is not set for php. You need to edit the php.ini to indicate your proper timezone in the formay of Europe/Zurich.

  • This only works if your IP gives you access to php.ini. cron.php does have access to the WordPress and Civicrm databases, so it should be able to get the information from there. [devside.net/wamp-server/… – Codedogs Aug 2 '16 at 17:21
  • 4.7.10 still has this problem. Would be nice if cron.php in the next release could acquire this information from the database. – Codedogs Aug 17 '16 at 19:10
  • That is probably part of a larger project (CRM-12246 or possibly some other issue) to ensure that all bin/*.php and extern/*.php callbacks, including cron.php, are replaced with civicrm/* routes that bootstrap the underlying CMS. There are a range of issues which arise when CiviCRM is almost but not always run inside a bootstrapped CMS, and timezone issues are one of them, while others are issues like CRM-17212. – Chris Burgess Dec 22 '16 at 1:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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