GNOME Bugzilla – Bug 786155
Floating time events incorrectly interpreted as UTC
Last modified: 2017-11-24 22:34:24 UTC
A floating time event is incorrectly interpreted as UTC. Calendar then wrongly "converts" that to local time for display, and "from" local time when writing. For example, on a system with a Europe/London time zone (currently UTC+1), the following: DTSTART:20170818T140000 DTEND:20170818T150000 is displayed in Calendar as 15:00-16:00 (i.e. interpreted as 14:00-15:00 UTC, then displayed as 15:00-16:00 UTC+1). Instead, it should be interpreted as 14:00-15:00 in the user's current time zone. Editing the event time continues this misinterpretation - the start/end are written out in floating time format, as if it is a UTC time being written. So editing the above example in Calendar and changing the times to 16:00-17:00 results in: DTSTART:20170818T150000 DTEND:20170818T160000 The iCalendar DATE-TIME value type forms are specified here: https://tools.ietf.org/html/rfc5545#section-3.3.5
Created attachment 361785 [details] [review] Interpreting floating time event as local instead of utc earlier floating time events when imported by ics files were treated as UTC and hence displayed wrongly in Calendar.But now changes have been made to allow a proper import of floating event in Calendar.I am also attaching the two ics files against which I have tested the patch. Waiting for the reviews.
Created attachment 361786 [details] [review] New patch for the previous comments the previous file attached wasn't a correct attachment.Sorry
Created attachment 361787 [details] sample ics file against which the patch is tested
I guess the patch will apply to CalDAV as well?
Review of attachment 361786 [details] [review]: The commit message body has a constant indentation, please remove it. The commit title does not follow neither the template at Newcomers Guide, nor Calendar's standard. At last, the patch is mostly composed of unrelated changes, and the only line of code that actually changed has the wrong coding style . Needs more work. ::: src/gcal-event.c @@ +213,3 @@ else + { + tz = g_time_zone_new_local(); Wrong code style
Created attachment 362065 [details] [review] Changes incorporated I have made the required changes
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-calendar/issues/171.