GNOME Bugzilla – Bug 655843
Copy to calendar doesn't add timezone information
Last modified: 2011-08-11 11:50:09 UTC
Copy from one calendar to another is done via means of an ical component. This component has no Timezone rules, so if the receiving calendar can't resolve the TZID, the timezone information is lost. A specific example is this meeting: BEGIN:VEVENT ATTENDEE;CN=;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO: jbottomley@parallels.com ORGANIZER;CN=Parallels Support Parallels Support:MAILTO: support4@parallels.com DTSTART;TZID=Russian Time:20110720T184500 DTEND;TZID=Russian Time:20110720T193000 LOCATION:https://parallels.webex.com/parallels TRANSP:OPAQUE SEQUENCE:1 UID:20110802T203136Z-19721-5224-2594-0@mulgrave DTSTAMP:20110720T144500Z DESCRIPTION:\nTest\n SUMMARY:Test\ PRIORITY:5 CLASS:PUBLIC CREATED:20110720T170614Z LAST-MODIFIED:20110720T170614Z X-EVOLUTION-MOVE-CALENDAR:1 BEGIN:VALARM TRIGGER;VALUE=DURATION:-PT5M ACTION:DISPLAY DESCRIPTION:Reminder X-EVOLUTION-ALARM-UID:20110720T170614Z-2354-5224-1-9@mulgrave END:VALARM END:VEVENT The problem is that TZID Russian Time isn't a standard string. My local calendar has the correct timezone rules: BEGIN:VTIMEZONE TZID:Russian Time BEGIN:STANDARD DTSTART:20091001T030000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 TZOFFSETFROM:+0400 TZOFFSETTO:+0300 TZNAME:Standard Time END:STANDARD BEGIN:DAYLIGHT DTSTART:20090301T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 TZOFFSETFROM:+0300 TZOFFSETTO:+0400 TZNAME:Daylight Savings Time END:DAYLIGHT END:VTIMEZONE But it doesn't export them to the icalcomponent, so the result of the copy is that the meeting gets added at the UTC equivalent of the time, which is wrong
(Please attach files as attachments here.)
Created attachment 193332 [details] [review] patch to fix the bug This is what fixes the problem for me. It loops over the ical to be copied and adds the timezone information to the destination if it didn't already have it. It's basically a clone of the existing timezone copy code in calendar/gui/dialog/copy_source.c except that it checks for pre-existing timezone information.
Thanks for a bug report and patch. It looks good except of two things: a) I removed the debugging printf you left there b) I also removed the check for timezone existence in the destination client, I believe the check there was unnecessary
Created commit 84b5668 in evo master (3.1.5+) Created commit ba697fd in evo gnome-3-0 (3.0.3+)