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

Use X-WR-TIMEZONE as calendar tz when available, fallback to UTC #2091

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

matiasb
Copy link
Contributor

@matiasb matiasb commented Jun 2, 2023

When checking current shifts to trigger slack notifications, a stable value for timezone should be used (to avoid triggering multiple duplicated notifications; using the first VTIMEZONE value available may change on refresh, besides being potentially incorrect).

Also, VTIMEZONE shouldn't be used as the calendar timezone, it just describes a timezone definition which can later be used when specifying a start/end date/datetime ("The parameter MUST be specified on properties with a DATE-TIME value if the DATE-TIME is not either a UTC or a "floating" time.").

OTOH, Google uses the non-standard X-WR-TIMEZONE field as fallback TZ for date-times without a TZID. Try to use this when available, otherwise fallback to UTC.

@matiasb matiasb added the pr:no public docs Added to a PR that does not require public documentation updates label Jun 2, 2023
@matiasb matiasb requested a review from a team June 2, 2023 17:13
@matiasb matiasb added this pull request to the merge queue Jun 2, 2023
Merged via the queue into dev with commit 0ab5312 Jun 2, 2023
@matiasb matiasb deleted the matiasb/slack-shift-notifications-calendar-tz branch June 2, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants