Seite 1 von 1

Time Zone handling in iCal-File (.ics)

Verfasst: Sa 15. Dez 2012, 11:41
von webdb22
Using the MPE sync for iCAL based calendars I've hit a strange behavior (bug?): Every time MPE wries (syncs) the .ics file it drops all time zone information!

The consequences:
a) Editing events in the .ics file using e.g. Thunderbird is weird as all events are based on UTC rather than on the correct local time zone settings
b) Display of events, which are on purpose set to different time zones (like flights crossing time zone borders, e.g. in the US from west coast to east coast) are weird, as they are reset to UTC.
c) Adding events on the Android device using Apps like "Jorte" defaults to the UTC time zone, you have to manually edit the time zone for each new event added.

MPE should preserve existing time zone settings of the .ics file (in the header as well as for each event) and should use the local time zone (or a time zone setting within MPE) for adding/editing events in MPE.

To reproduce:
Create a new calendar based on .ics file in Thunderbird ( New Calendar | On the network | iCalender ) and add at least one event. This creates an .ics file containing the correct local time zone (X-WR-TIMEZONE), stating the time zones used in the calendar (BEGIN:VTIMEZONE .. END:VTIMEZONE) and using the correct time zone for each event (DTSTART;TZID=...):

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
X-WR-CALNAME:MPE
X-WR-TIMEZONE:Europe/Vienna
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20121215T102332Z
LAST-MODIFIED:20121215T102519Z
DTSTAMP:20121215T102519Z
UID:67b15c3e-b051-49e5-a995-5e4e2b1d40e4
SUMMARY:Lunch
DTSTART;TZID=America/New_York:20121225T120000
DTEND;TZID=America/New_York:20121225T130000
TRANSP:OPAQUE
SEQUENCE:1
X-MOZ-GENERATION:1
END:VEVENT
END:VCALENDAR

Setup sync with MPE, add an event and sync the calendar. This removes VTIMEZONE sections as well as all TZID references, basically resetting the whole calendar to UTC time zone.

Is there a fix or workaround available? Thanks!

Verfasst: Mo 31. Dez 2012, 15:16
von FJ
There is currently no workaround but i look if i can fix it until the next update.

You could sync directly with Thunderbird, this would prevent this issue.

Verfasst: Mi 2. Jan 2013, 11:03
von webdb22
Great! Would be nice to have fully functional .ics support in MPE, would make MPE even more useful! I'd be glad to support you by testing the implementation if this helps?

Thanks!