Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#7270 closed enhancement (fixed)

ical/ics files created by mythweb do not set the time correctly in google calendar, due to TZ issues - patch attached.

Reported by: matt@… Owned by: Rob Smith
Priority: minor Milestone: 0.24
Component: Plugin - MythWeb Version: head
Severity: medium Keywords: ical ics calendar google
Cc: Ticket locked: no


Google Calendar is very picky about the data it will accept from an ICS file provided to it via a URL (i.e. subscribing to a calendar).

The attached patch resolves the issue by converting all times to UTC, and setting the TZID to Etc/Universal?, which Google seems to like.

This seems to be the least invasive means to get the calendar to work correctly with Google. Another method would be the leave out the TZID, and add a "Z" to the end of the UTC time string, but the vcalendar class doesn't seem to support this natively.

Attachments (1)

ical-change-to-utc.patch (3.2 KB) - added by matt@… 12 years ago.
Patch to convert ical time information to UTC, and set TZID to Etc/Universal?

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by matt@…

Attachment: ical-change-to-utc.patch added

Patch to convert ical time information to UTC, and set TZID to Etc/Universal?

comment:1 Changed 12 years ago by Rob Smith

Milestone: unknown0.22.1

comment:2 Changed 12 years ago by anonymous

Another method would be to use the X-WR-TIMEZONE property of vcalendar. This property is supported by Google calendar, Outlook, and iCal, amongst others I'm sure. The code I put in modules/tv/tmpl/ical/upcoming.php is

$tz = date("e"); $calendar->setProperty( "X-WR-TIMEZONE", $tz );

comment:3 Changed 11 years ago by Stuart Auchterlonie


We've decided not to do a 0.22 point release

comment:4 Changed 11 years ago by robertm

Milestone: 0.230.24

Bumping enhancement patch to next release.

comment:5 Changed 11 years ago by Rob Smith

Resolution: fixed
Status: newclosed

(In [24910]) Fixes #7270, this adds in the X-WR-TIMEZONE header by default to all vcalendar outputs

comment:6 Changed 11 years ago by matt@…

Unfortunately, this doesn't seem to do the trick for Google. They say they need this, but they also need the much more complex VTIMEZONE/TZID/TZOFFSETFROM/TZOFFSETTO... type entries. I think the original approach of utilizing UTC is much more simplistic, and actually works with Google atrocious ICAL parser.

Note: See TracTickets for help on using tickets.