Should event times specified in UTC while generating ICS files, to avoid issues with myriad calendaring applications

后端 未结 1 363
执念已碎
执念已碎 2021-01-23 00:42

Handling timezones is tricky enough to say the least. And when it gets into generating ics files for scheduling meetings/events, it gets messier.

There have ben plenty o

相关标签:
1条回答
  • 2021-01-23 00:59

    No. Most events cannot be scheduled by UTC. If it were that simple, that's how we would do it. It's a lot more intricate.

    Imagine you had a meeting every day at 10:00 AM, US Pacific Time, starting January 1st. That would be 6:00 PM UTC - so you put that in your invitation and expect all to work itself out. It all works fine, until the second Sunday in March, when daylight saving time goes into effect. Your 6:00 PM UTC meeting would then line up with 11:00 AM Pacific Time - which is not how you intended the meeting to be scheduled.

    But wait - it gets worse. The DST rules can actually change. This last happened in the USA in 2007, but it happens all the time in different parts of the world. Sometimes it's not just the DST that changes, but the base offset itself. If you schedule by UTC, you're setting up the expectation that everything you know about time zones will be exactly as it currently is - but nobody can predict the future.

    Proper scheduling requires all of the following:

    • The original local time value of the event
    • A time zone identifier - preferably one from the IANA time zone database
    • All systems to be kept updated with time zone data updates
    • Governments to play nice and allow sufficient time for updates to be propagated

    The last one is really important, and there's little you can do about it. In recent years, countries such as Egypt, Morocco, and Fiji have made changes with just a few days or a few weeks notice. Even large countries like Russia change their time zones - so you have to be prepared for updates. You can review the long history of time zone updates, and watch for future changes here.

    0 讨论(0)
提交回复
热议问题