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 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.

Elsewhere in the CiviCRM code there is a function to set the MySQL timezone: CRM/Utils/System/Base.php. If this sets the MySQL timezone in code does it matter that the PHP and MySQL timezones don't match?

  • Check this post out, should clarify the issue Mismatched Timestamps Commented Nov 17, 2015 at 16:20
  • Thanks, I've seen that post but it doesn't answer my question of whether this error actually causes any problems. Commented Nov 17, 2015 at 16:23
  • 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. Commented Nov 17, 2015 at 16:26
  • 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? github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/… Commented Dec 16, 2015 at 14:57
  • 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. Commented Dec 16, 2015 at 16:34


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.