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.
This commit is contained in:
Paul Eggert 2018-05-28 20:15:04 -07:00 committed by Philip Withnall
parent ad957b6630
commit 137dd7789b

View File

@ -1677,7 +1677,10 @@ interval_end (GTimeZone *tz,
guint interval) guint interval)
{ {
if (tz->transitions && interval < tz->transitions->len) 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; return G_MAXINT64;
} }