After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655843 - Copy to calendar doesn't add timezone information
Copy to calendar doesn't add timezone information
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
2.32.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2011-08-02 20:45 UTC by James Bottomley
Modified: 2011-08-11 11:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix the bug (1.93 KB, patch)
2011-08-05 22:23 UTC, James Bottomley
reviewed Details | Review

Description James Bottomley 2011-08-02 20:45: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
Comment 1 André Klapper 2011-08-03 09:55:18 UTC
(Please attach files as attachments here.)
Comment 2 James Bottomley 2011-08-05 22:23:25 UTC
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.
Comment 3 Milan Crha 2011-08-11 11:47:39 UTC
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
Comment 4 Milan Crha 2011-08-11 11:49:57 UTC
Created commit 84b5668 in evo master (3.1.5+)
Created commit ba697fd in evo gnome-3-0 (3.0.3+)