Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19115

PHP and MySQL timezones mismatch over API but not in UI

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.9
    • Fix Version/s: 4.7.11
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      CRM_Utils_System_Base::setMySQLTimeZone is the method that pulls in the CMS's timezone to correct for differences in PHP/MySQL time zones. And that method is called by civicrm_initialize();.

      However, that method is NOT called when you make an API call to System.check. So you end up in a situation where a remote monitor tool (like CiviMonitor, or https://github.com/PalanteJon/check_civicrm) reports a timezone mismatch that the Web UI doesn't.

      The solution is to call CRM_Utils_System_Base::setMySQLTimeZone when doing the timezone check. I have a PR for this which I'll submit once it's passed more internal QA.

      Herb, this may also fix your problem in CRM-15656.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              palantejon Jon K Goldberg
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: