Answers.Body: <p>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. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-02T17:21:00.407Z
Answers.Text: 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. [https://www.devside.net/wamp-server/setting-the-default-timezone-for-php-to-use]
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-17T19:10:33.637Z
Answers.Text: 4.7.10 still has this problem. Would be nice if **cron.php** in the next release could acquire this information from the database.
Answers.UserDisplayName: Codedogs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-22T01:18:30.097Z
Answers.Text: That is probably part of a larger project ([CRM-12246](https://issues.civicrm.org/jira/browse/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](https://issues.civicrm.org/jira/browse/CRM-17212).
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-24T21:04:14.527Z
Answers.LastActivityDate: 2016-06-24T21:04:14.527Z
Answers.UserDisplayName: Kevin Cristiano
Body: <p>running CiviCRM 4.7.8 WordPress</p>
  
  <p>The following is appearing in the <strong>error_log</strong> whenever <strong>cron.php</strong> runs:</p>
  
  <p><code>[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</code></p>
  
  <p>Is anyone aware which class is supposed to be responsible for setting the timezone in this case?</p>
  
Tags: <wordpress><4.7><cron-job><php><mailing>
Title: cron.php display warning in error_log
ThreadText: # cron.php display warning in error_log
  
  (Asked by: username_0 on 2016-06-24)
  
  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?
  
  **Tags:** wordpress, 4.7, cron-job, php, mailing
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-06-24. Score: 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.
  
  > **Comments:**
  > **username_0**: 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. [https://www.devside.net/wamp-server/setting-the-default-timezone-for-php-to-use]  
  > **username_0**: 4.7.10 still has this problem. Would be nice if **cron.php** in the next release could acquire this information from the database.  
  > **username_2**: That is probably part of a larger project ([CRM-12246](https://issues.civicrm.org/jira/browse/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](https://issues.civicrm.org/jira/browse/CRM-17212).  
  
  ---
  
  