0

I created a webcal stream, and Google Calendar reads it successfully, and creates events. However, the events it creates are 5 hours earlier than they should be. The event below, for instance, comes up at 1pm.

If I take the same webcal stream and save it as an .ics file, and then import that file into Google calendar, all the times are correct.

Why would Google calendar handle these differently? In the Mac Calendar application, the events come up at the right time, whether I add them via the webcal stream, or by importing the .ics file.

Both Google Calendar and Mac Calendar know that I'm in EST (via calendar settings - nothing declared in the ICS file, as you can see).

I'd like Google to handle the webcal stream correctly, so that it will auto-update as I add more events.

The start of the ICS file, and a single event, are listed here. It shows up at 6pm in Mac Calendar, and 1pm in Google Calendar.

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
METHOD:PUBLISH
PRODID:iCalendar-Ruby
VERSION:2.0
BEGIN:VEVENT
DESCRIPTION: football game on Sunday at 6pm, on NBC, with dinner
DTEND:20121208T233000Z
DTSTAMP:20130124T200858
DTSTART:20121208T230000Z
CLASS:PUBLIC
SEQUENCE:0
SUMMARY:sunday 6pm football game
UID:2013-01-24T20:08:58+00:00_945022440@e8deb599-a4b6-40a3-b82c-d1baf5e9109e
END:VEVENT
END:VCALENDAR
Kara
  • 6,115
  • 16
  • 50
  • 57
Theiteg
  • 37
  • 1
  • 7

1 Answers1

1

This is because Google Calendar doesn't do floating timezones, so when there is no timezone specified it assumes to be UTC. Mac calendar assumes your timezone when you import something that does not have a specific timezone specified in the ics file. So you will have to have add timezone information to your file.

How Google Calendar works with time zones

Writing ICS files for multiple clients, including Google

Adding a VTIMEZONE section to your file should help:

BEGIN:VTIMEZONE
TZID:Eastern
BEGIN:STANDARD
DTSTART:16011104T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010311T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
END:DAYLIGHT
END:VTIMEZONE
Community
  • 1
  • 1
keeg
  • 3,990
  • 8
  • 49
  • 97
  • Thanks Keeg. Doesn't adding a Z to the end of the time (as in DTSTART:20121208T230000Z) indicate that the time is in UTC? I've adjusted my times assuming this would be the case. Also, I still don't understand why Google Calendar would handle the timezone differently when it's a webcal vs when it's an imported .ics file – Theiteg Jan 24 '13 at 21:47
  • as far as I know google calendar is not actually RFC compliant: http://tools.ietf.org/html/rfc2445#section-4.3.5 and should not assume UTC when the time is floating – keeg Jan 24 '13 at 22:15
  • So in the end, I just manually added a chunk of time to UTC (and used Z to indicate UTZ) to account for my time zone. This works, so times are right both in gcal and mac calendar. Google Calendar's non-updatability for webcal streams makes it very hard to work with. I'd even switch google accounts, and add the same webcal stream to a different account - still wouldn't update. Not sure how Google handles webstreams like that, and would love if they'd explain it somewhere (or love it even more if they'd let users control update behavior). Thanks again for taking a look. – Theiteg Feb 04 '13 at 02:05