Open derelk opened 2 years ago
I've learned that if I replace the TZID
in DTSTART
and DTEND
with the timezone name, the .ics file works as expected.
Before (doesn't work):
DTSTART;TZID=AST:20211201T153000
DTEND;TZID=EST:20211201T183000
After (works):
DTSTART;TZID=America/Anguilla:20211201T153000
DTEND;TZID=US/Eastern:20211201T183000
The following sample code to generate a simple event that spans 2 timezones (AST to EST) seems to create an invalid .ics file. The file cannot be read correctly by the macOS Calendar app, which treats it as a calendar rather than an individual event and will not import the event regardless.
It's also possible that it's an Apple bug, rather than vobject, but I don't understand the VCalendar format well enough to know where the issue is. My guess is it for some reason thinks the end time is before the start time due to the timezone difference, but that isn't true; these timezones are only 1 hour apart for this date, and I even used an assert to confirm that the end time is greater than the start time. Still, if I make the times further apart, it works correctly.
Any idea what's going on here?
macOS Big Sur 11.6.1 Calendar 11.0 Python 3.9.9 vobject 0.9.6.1