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

Fix UTC offsets when retrieving timezone string in WordPress #298

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

christianwach
Copy link
Member

@christianwach christianwach commented Jun 22, 2023

Overview

Fixes this issue on Lab.

Before

In WordPress, one can choose e.g. UTC+4 as the site's timezone. This results in no value being returned by get_option('timezone_string') which may lead to unexpected results in CiviCRM.

After

When choosing e.g. UTC+4 in WordPress, a deprecated (but still currently valid) Etc/UTC-4 timezone string is used.

Comments

There is a companion PR in the CiviCRM-Core repo.

@christianwach
Copy link
Member Author

Gah, the old Undefined array key "page" test failure 🤷

@demeritcowboy
Copy link
Contributor

I did a quick little run. For example creating an activity in the UI defaults the activity date to the wrong time currently, and with the PR sets it according to the configured offset.

@demeritcowboy
Copy link
Contributor

jenkins retest this please

@kcristiano
Copy link
Member

Failing Check is unrelated.

Have done multiple r-run via API and different forms we use on client sites. All looks good.

Will merge once civicrm/civicrm-core#26604 is merged.

@kcristiano kcristiano merged commit 1c11acc into civicrm:master Jun 27, 2023
@christianwach christianwach deleted the lab-wp-121 branch July 12, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants