From 137dd7789b870be7c5acc2e1dcdbb1f44442b8b1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 May 2018 20:15:04 -0700 Subject: gtimezone: port to tzcode 2014c Problem reported by Marien Zwart in: https://gitlab.gnome.org/GNOME/glib/issues/878 Derived from a fix by John Ralls proposed in that bug report. --- glib/gtimezone.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glib/gtimezone.c b/glib/gtimezone.c index 72a4916ad..b3220dc35 100644 --- a/glib/gtimezone.c +++ b/glib/gtimezone.c @@ -1677,7 +1677,10 @@ interval_end (GTimeZone *tz, guint interval) { if (tz->transitions && interval < tz->transitions->len) - return (TRANSITION(interval)).time - 1; + { + gint64 lim = (TRANSITION(interval)).time; + return lim - (lim != G_MININT64); + } return G_MAXINT64; } -- cgit v1.2.1