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 786155 - Floating time events incorrectly interpreted as UTC
Floating time events incorrectly interpreted as UTC
Status: RESOLVED OBSOLETE
Product: gnome-calendar
Classification: Applications
Component: General
3.24.x
Other Linux
: Normal major
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-11 13:42 UTC by Stephen
Modified: 2017-11-24 22:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Interpreting floating time event as local instead of utc (7.56 KB, patch)
2017-10-18 08:16 UTC, Karuna Grewal
none Details | Review
New patch for the previous comments (1.84 KB, patch)
2017-10-18 08:25 UTC, Karuna Grewal
needs-work Details | Review
sample ics file against which the patch is tested (627 bytes, text/calendar)
2017-10-18 08:28 UTC, Karuna Grewal
  Details
Changes incorporated (1017 bytes, patch)
2017-10-23 00:28 UTC, Karuna Grewal
none Details | Review

Description Stephen 2017-08-11 13:42:09 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
Comment 1 Karuna Grewal 2017-10-18 08:16:04 UTC
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.
Comment 2 Karuna Grewal 2017-10-18 08:25:56 UTC
Created attachment 361786 [details] [review]
New patch for the previous comments

the previous file attached wasn't a correct attachment.Sorry
Comment 3 Karuna Grewal 2017-10-18 08:28:33 UTC
Created attachment 361787 [details]
sample ics file against which the patch is tested
Comment 4 Stephen 2017-10-18 10:22:01 UTC
I guess the patch will apply to CalDAV as well?
Comment 5 Georges Basile Stavracas Neto 2017-10-23 00:08:14 UTC
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
Comment 6 Karuna Grewal 2017-10-23 00:28:56 UTC
Created attachment 362065 [details] [review]
Changes incorporated

I have made the required changes
Comment 7 Georges Basile Stavracas Neto 2017-11-24 22:34:24 UTC
-- 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.