Body: <p>I am getting the following error when I log in to CiviCRM:</p>
  
  <blockquote>
    <p>Timestamps reported by MySQL (eg "2015-11-06 13:44") and PHP (eg
    "2015-11-06 11:44" ) are mismatched.</p>
  </blockquote>
  
  <p>I have <a href="https://civicrm.stackexchange.com/questions/7527/timestamp-mismatch-between-mysql-and-php">reported this</a> separately and haven't been able to fix this yet.  However, I wonder if it actually causes any real problems or if I can just ignore this error message.</p>
  
  <p>Does anyone know what problems are caused if the timestamps for PHP and MySQL don't match?</p>
  
  <p>The code that displays this error is in <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Check/Component/Env.php#L76" rel="nofollow noreferrer">CRM/Utils/Check/Component/Env.php</a>.</p>
  
  <p>Elsewhere in the CiviCRM code there is a function to set the MySQL timezone: <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Base.php#L677" rel="nofollow noreferrer">CRM/Utils/System/Base.php</a>.  If this sets the MySQL timezone in code does it matter that the PHP and MySQL timezones don't match?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-17T16:20:10.083Z
Comments.Text: Check this post out, should clarify the issue [Mismatched Timestamps](http://civicrm.stackexchange.com/questions/591/how-do-i-set-the-time-zones-in-order-to-correct-mismatched-timestamps-for-mysql)
Comments.UserDisplayName: Parvez Saleh
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-17T16:23:57.043Z
Comments.Text: Thanks, I've seen that post but it doesn't answer my question of whether this error actually causes any problems.
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-17T16:26:06.183Z
Comments.Text: It'll cause problems if theres data being generated by the MySQL database as a posed to be handed to it via the PHP side of things. For instance if you've got logging enabled then the data will be logged with timestamps according to mysql as a posed to the time the actual edit took place. I don't think anything serious will break but it could get confusing an tricky to track back data accurately.
Comments.UserDisplayName: Parvez Saleh
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-16T14:57:07.333Z
Comments.Text: Elsewhere in the CiviCRM code there is a function to set the MySQL timezone.  Does this not synchronise the MySQL time to the local time? https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Base.php#L677
Comments.UserDisplayName: William Mortada
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-16T16:34:09.250Z
Comments.Text: I don't think it can at the server level. CiviCRM now users triggers more then it used to and also the NOW statement is used during inserts so the timezone is important. Yes, at a technical level the timezone I think can be set during connection but at present thats not what CiviCRM does.
Comments.UserDisplayName: Parvez Saleh
Tags: <error><mysql><php><timezone>
Title: Does the 'timestamp mismatch' error cause any real problems?
ThreadText: # Does the 'timestamp mismatch' error cause any real problems?
  
  (Asked by: username_0 on 2015-11-10)
  
  I am getting the following error when I log in to CiviCRM:
  
  > Timestamps reported by MySQL (eg "2015-11-06 13:44") and PHP (eg
  > "2015-11-06 11:44" ) are mismatched.
  
  I have [reported this](https://civicrm.stackexchange.com/questions/7527/timestamp-mismatch-between-mysql-and-php) separately and haven't been able to fix this yet. However, I wonder if it actually causes any real problems or if I can just ignore this error message.
  
  Does anyone know what problems are caused if the timestamps for PHP and MySQL don't match?
  
  The code that displays this error is in [CRM/Utils/Check/Component/Env.php](https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/Check/Component/Env.php#L76).
  
  Elsewhere in the CiviCRM code there is a function to set the MySQL timezone: [CRM/Utils/System/Base.php](https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Base.php#L677). If this sets the MySQL timezone in code does it matter that the PHP and MySQL timezones don't match?
  
  **Tags:** error, mysql, php, timezone
  
  > **Comments:**
  > **username_1**: Check this post out, should clarify the issue [Mismatched Timestamps](http://civicrm.stackexchange.com/questions/591/how-do-i-set-the-time-zones-in-order-to-correct-mismatched-timestamps-for-mysql)  
  > **username_0**: Thanks, I've seen that post but it doesn't answer my question of whether this error actually causes any problems.  
  > **username_1**: It'll cause problems if theres data being generated by the MySQL database as a posed to be handed to it via the PHP side of things. For instance if you've got logging enabled then the data will be logged with timestamps according to mysql as a posed to the time the actual edit took place. I don't think anything serious will break but it could get confusing an tricky to track back data accurately.  
  > **username_0**: Elsewhere in the CiviCRM code there is a function to set the MySQL timezone.  Does this not synchronise the MySQL time to the local time? https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Base.php#L677  
  > **username_1**: I don't think it can at the server level. CiviCRM now users triggers more then it used to and also the NOW statement is used during inserts so the timezone is important. Yes, at a technical level the timezone I think can be set during connection but at present thats not what CiviCRM does.  
  
  ---
  
  ## 0 answers
  
  