I'm seeing erroneous behavior with a by-day (e.g. every Tuesday and Thursday) recurrence pattern.
Suppose I have an event starting on Thursday 3/12 at 9p (2100h) Pacific time and recurring every Tuesday and Thursday. Pacific time is UTC-0700
, so the event has a UTC start date of 0400h on 3/13--4am the following day.
When my recurrences are generated they take the start time of the original event, but not the date. So my recurrences are generated on Tuesdays and Thursdays at 0400h, which translates to 9p PT on Mondays and Wednesdays.
I've tried creating the events in local (Pacific) time and specifying a TZ-ID
, but it doesn't seem to help.
Is there a way to account for this? I don't want to try to infer whether there will be an issue and rewrite the recurrence pattern on the fly, as that A) seems very error prone, and B) will make the interface for editing the recurrence pattern very challenging as well.
EDIT:
Consider this RRULE:
DTSTART:20200411T013000Z
RRULE:FREQ=WEEKLY;UNTIL=20200501T030000Z;BYDAY=FR
It was created to start at 6:30p PT on Friday, April 10, and repeat every Friday.
When converted to UTC that means that it has a start date of 1:30a on April 11th.
The issue is that the BY_DAY=FR
is forcing all of the child events to get created on Fridays with start times of 1:30a, meaning that they start Thursday evening mountain time.
I don't think it's a code issue, I think it's an issue of the BY_DAY
recurrence rule causing issues when the starting time is after midnight UTC.
Also, note that this is an example. Obviously in this case the BY_DAY
field is not required. But if I wanted it to repeat on Wednesdays and Fridays I would need it, and that's where I'm running into the issue.