Search code examples
icalendarrfc5545

Isn't iCalendar DTSTART with UTC bad?


The RFC5545 spec allows DTSTART to be specified in UTC time. I'm thinking that's bad though, and could lead to be off by an hour. For example, where I live we honor DST, but parts of Arizona do not. So if the person in Arizona creates an event and it's just stored in UTC, won't I have a "one off" problem when DST switches on or off?

I'm thinking that I should always write the DTSTART and DTEND times with a TZID identifier.


Solution

  • No - the app or program displaying the time should convert the time correctly for the given day. It shouldn't matter what timezone you store the DTSTART in. What matters is correct Timezone transition for the given date by the program that's displaying the time.

    So around the daylight saving switchover of a destination. two UTC times will map to the same destination time.

    Aside: There are some very big well known systems don't do Timezone setup for daylight saving zones in the best possible way, but that's a different problem.