Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19115 - Synchronize PHP=>MySQL active timezone for all backend scripts #13220

Merged
merged 1 commit into from
Dec 4, 2018

Conversation

totten
Copy link
Member

@totten totten commented Dec 4, 2018

Overview

In CRM-19115, it was previously observed that checkMysqlTime fails when run in some backend/background environments (e.g. REST). This patch is an alternative which tries to fix the problem (mismatch in PHP-MySQL times for extern/rest.phpuse-cases) rather than the symptom (undesireable error message).

NOTE: For testing, I used the spare CI test node (which has mismatched PHP-MySQL default timezones) and applied #13218 (to re-enable checkMysqlTime). In that environment, one could check if the REST end-point has the correct behavior by running:

curl 'http://example.com:8001/sites/all/modules/civicrm/extern/rest.php?entity=System&action=check&api_key=FIXME_API_KEY&key=FIXME_SITE_KEY&json=%7B%7D' \
  | json_pp | less

Then simply observe whether checkMysqlTime reports an error.

Before

  • The curl request for System.check reports that checkMysqlTime fails -- PHP+MySQL are not aligned.

After

  • The curl request for System.check reports that checkMysqlTime passes -- PHP+MySQL are aligned.

@civibot
Copy link

civibot bot commented Dec 4, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor

Seems both safe and sensible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants