oncall-engine/engine/apps/schedules
Matias Bordese 0ab5312bf1
Use X-WR-TIMEZONE as calendar tz when available, fallback to UTC (#2091)
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](https://icalendar.org/iCalendar-RFC-5545/3-6-5-time-zone-component.html)
which can later be [used when specifying a start/end
date/datetime](https://icalendar.org/iCalendar-RFC-5545/3-2-19-time-zone-identifier.html)
("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`
](https://github.com/collective/icalendar/issues/343)field as fallback
TZ for date-times without a `TZID`. Try to use this when available,
otherwise fallback to `UTC`.
2023-06-02 17:28:04 +00:00
..
ical_events Do not include event repetitions terminated before start (until rrule) 2022-11-30 08:56:19 -03:00
migrations Remove schedule name uniqueness restriction (#1859) 2023-05-02 17:16:03 +00:00
models Handle date values coming from ical in final schedule caching (#2025) 2023-05-25 18:17:09 +00:00
tasks Refresh final schedule after cached icals are dropped (#2004) 2023-05-25 12:01:52 +00:00
tests Use X-WR-TIMEZONE as calendar tz when available, fallback to UTC (#2091) 2023-06-02 17:28:04 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
admin.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
constants.py Refactor upcoming shifts to use cached final schedule data (#1891) 2023-05-08 19:01:24 +00:00
ical_utils.py Use X-WR-TIMEZONE as calendar tz when available, fallback to UTC (#2091) 2023-06-02 17:28:04 +00:00