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 780079 - weekview: dates are off by an hour
weekview: dates are off by an hour
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: User Interface
unspecified
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-15 06:46 UTC by Christian Hergert
Modified: 2017-03-15 11:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example of bug (30.99 KB, image/png)
2017-03-15 06:46 UTC, Christian Hergert
  Details
week-grid: consider daylight when calculating event position (2.29 KB, patch)
2017-03-15 11:55 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Christian Hergert 2017-03-15 06:46:34 UTC
Created attachment 347987 [details]
example of bug

Two things actually:

 - 12 PM says 12 AM instead (but 00 correctly says 12 AM)
 - The entry is at 1 PM, but is rendered in the 12 PM slot
Comment 1 Georges Basile Stavracas Neto 2017-03-15 11:32:08 UTC
After investigating this issue, it turns out that the reason this happens is because the daylight time saving changed at 2am (instead of midnight, which is what should've happened).

That leads to the question: how to communicate the user that a timezone changed in the middle of the week?
Comment 2 Georges Basile Stavracas Neto 2017-03-15 11:38:01 UTC
For the record, this is what I get here. When I start with:

> '12-03-2017 00:00:00 -0800' (DST: NO)

Then I add exactly 2 hours, and I get:

> '12-03-2017 03:00:00 -0700' (DST: YES)

Notice that the clock advanced 2 hours + switched the DST at 2am.
Comment 3 Georges Basile Stavracas Neto 2017-03-15 11:55:28 UTC
Created attachment 348001 [details] [review]
week-grid: consider daylight when calculating event position

There are some weird cases around the globe where the timezone
changes in the middle of the day. In GMT-8:00, for example, the
DST changes at 2:00 am. This makes the timezone of thestart of
the week different from the event's timezone, and somehow the
GLib API doesn't take that into account when calculating the
diff between two dates.

Fix that by also considering different timezones when calculating
the event start and end positions.
Comment 4 Georges Basile Stavracas Neto 2017-03-15 11:56:28 UTC
Thanks for the report. Fixed in master.

Attachment 348001 [details] pushed as d4ef9b2 - week-grid: consider daylight when calculating event position