Opened 16 years ago

Closed 15 years ago

Last modified 15 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

Description

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@… 16 years ago.
Patch to convert ical time information to UTC, and set TZID to Etc/Universal

Download all attachments as: .zip

Change History (7)

by matt@…, 16 years ago

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

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

comment:1 by Rob Smith, 16 years ago

Milestone: unknown0.22.1

comment:2 by anonymous, 16 years ago

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 by Stuart Auchterlonie, 16 years ago

Milestone: 0.22.10.23

We've decided not to do a 0.22 point release

comment:4 by robertm, 16 years ago

Milestone: 0.230.24

Bumping enhancement patch to next release.

comment:5 by Rob Smith, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:6 by matt@…, 15 years ago

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.