aaronpk / Meetable

an event listing website
https://meetable.org
MIT License
115 stars 10 forks source link

Wrong time displayed in Google Calendar after using Add to Calendar link #112

Closed Zegnat closed 4 years ago

Zegnat commented 4 years ago

I was trying to add today's microformats2 event to my calendar by clicking the link. On the event it is displayed as starting at 9:30am (America/Los_Angeles).

The URL that I end up at on Google Calendar looks like this, and seems to have the correct time in a dates parameter:

https://calendar.google.com/calendar/u/0/r/eventedit?text=microformats2+issues+resolution+session&details=https://events.indieweb.org/2020/09/microformats2-issues-resolution-session-cay9SF07oNTY&location&ctz=America/Los_Angeles&dates=20200912T093000

But the Google UI displays a start time of 12:00:

Screenshot: Google's calendar event adding UI showing a wrong start time of 12:00 for the microformats event.

12:00 is the next upcoming full hour (writhing this at 11:40 my time). Will try the link again in an hour to see if that makes the time skip ahead. In that case it may just be ignoring the dates parameter completely.

It may be something specific to the mf2 event, its date time, or its time zone. Testing the Homebrew Website Club East Coast Timezone event next month generates the following URL:

https://calendar.google.com/calendar/u/0/r/eventedit?text=Homebrew+Website+Club+East+Coast+Timezone&details=https://events.indieweb.org/2020/10/homebrew-website-club-east-coast-timezone-R6heVhFhQZgn&location&ctz=America/New_York&dates=20201014T180000/20201014T190000

This does seem to result in the correct time info:

Screenshot: Google's calendar event adding UI showing the correct information for the HWC event.

Zegnat commented 4 years ago

I can confirm two things:

  1. Using the link right now (14:55), the time is set to 15:00–16:00. So it looks like it just takes the first upcoming hour in my local time zone. Which makes little sense, as 15:00 LA time is not at all close.
  2. Modifying the Google link and adding /20200912T093000 to the end of the data (basically telling Google it ends at its start time) fixes the issue. It sets the event to be from 9:30 to 9:30. So it looks like an end time is always required. (As mentioned by @aaronpk.)