Open seriouslysean opened 9 months ago
The more I look in to this, the less I think a timezone will fix things. In order to have an event that starts at the same time regardless of timezone, I'd either need to use floating times (which I do already) or create a separate event per timezone. Taking Eastern, Central and Pacific time, I'd need 3 different calendar feeds with events just for that timezone, or 3 different events:
BEGIN:VEVENT
UID:1@example.com
DTSTART;TZID=America/New_York:20230101T130000
DTEND;TZID=America/New_York:20230101T160000
SUMMARY:Event for Eastern Time
END:VEVENT
BEGIN:VEVENT
UID:2@example.com
DTSTART;TZID=America/Chicago:20230101T130000
DTEND;TZID=America/Chicago:20230101T160000
SUMMARY:Event for Central Time
END:VEVENT
BEGIN:VEVENT
UID:3@example.com
DTSTART;TZID=America/Los_Angeles:20230101T130000
DTEND;TZID=America/Los_Angeles:20230101T160000
SUMMARY:Event for Pacific Time
END:VEVENT
Which isn't really a solve at all.
Short of creating a web server or some sort to infer user location and automatically assign the timezone, then send back a user specific file, I don't see this working out.
To humor myself, I asked ChatGPT what it thought about the issue:
Apple Calendar on iOS works with floating timezones, but microsoft outlook and google calendar appear not to.
The issue is that the events I'm tracking occur for a fixed duration at the same time regardless of timezone. So if the event is 1-4pm, it's 1-4pm anywhere you are in the world.
This doesn't seem to work with fixed times. If I was to use GMT and set the event to 1-4pm, each consumer of the ics file would alter the time and date based on their own particular offsets. Do you have any suggestions on how to handle that issue?
The situation you're describing is a unique one. Typically, events have a fixed time in a specific timezone, and users in different timezones see the event's local equivalent. But you want the event to appear at the exact same local time regardless of the user's timezone.
Floating times in iCalendar format are indeed intended for this purpose, but as you've noticed, not every calendar software handles them correctly.
Here are a few potential solutions to tackle the problem:
Create Multiple ICS Files: You could generate separate ICS files for each major timezone you're targeting. This is tedious and doesn't cover every individual case, but for a broad audience, targeting the major timezones (PST, CST, EST, etc.) might be enough. Users would need to pick or be directed to the appropriate ICS file based on their location.
Use an Intermediary Service: Instead of directly offering an ICS file, you could have users sign up for calendar updates on a website. Once they choose their timezone, your backend could generate personalized calendar events for them. This is a more interactive solution and requires a bit of infrastructure but offers a personalized touch.
Educate & Instruct: Since there is no perfect technical solution for this because of varying client behavior, you could use the DESCRIPTION or LOCATION field of the event to remind users to adjust the time as necessary for their timezone. E.g., "This event is set for 1-4pm YOUR LOCAL TIME. Please adjust if it appears differently."
Duplicate Events: This is a bit of a hack, but you could add the same event multiple times to the ICS file, once for each major timezone. This will cause the event to appear correctly for most users, but users will also see duplicates of the event at other times of the day. This is not an ideal solution, but it's an option.
Feedback to Calendar App Developers: Given the nature of this problem and the inconsistencies across calendar apps, it could be valuable to submit feedback to major calendar software developers like Google and Microsoft. It's a long shot, but if enough people have this use case and raise the issue, it could lead to improved handling of floating times in future software versions.
The core of the issue is the lack of consistent behavior across calendar clients, which makes it challenging to find a one-size-fits-all solution. You'll need to consider the trade-offs of each approach and decide which one aligns best with your user base and project goals.
Outlook actually shows the events correctly, also.
Bug Description
Event from the ICS file
Not the lazy of a
Z
at the end of the datetime (this implies floating time). When utilizing floating times, Google Calendar infers a timezone for the event (which seems to be UTC).This doesn't work for MHN events as they're timezone agnostic. If the event is 1-4pm, it's 1-4pm in every single timezone which means a fixed point in time isn't possible.
At this point the only solution I can think of is to have timezone specific subscriptions, but that only works if you never leave your timezone. Retaining the floating time would be much better.
Expected Behavior
Google Calendar should show events at the proper time, similar to how Apple Calendar does.
Steps to Reproduce (Optional)