]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Handle leap seconds even if no DST rule exists.
authorAkinori Hattori <hattya@gentoo.org>
Mon, 15 Jun 2009 17:54:26 +0000 (10:54 -0700)
committerUlrich Drepper <drepper@redhat.com>
Mon, 15 Jun 2009 17:54:26 +0000 (10:54 -0700)
This fixes BZ #10211.

ChangeLog
time/tzfile.c

index dcd7444dd56827db96ea058832db334bd4db5b49..d758a8394f2ab7f8d7be961fa13741781d9a12fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-06-15  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #10211]
+       * time/tzfile.c (__tzfile_compute): If we use the envvar format still
+       handle leap seconds if they are available.
+       Patch by Akinori Hattori <hattya@gentoo.org>.
+
        * timezone/tzselect.ksh: Update from tzcode2009i.
        * timezone/zdump.c: Likewise.
        * timezone/zic.c: Likewise.
index 970022379a7c5658243988e0fc5a17bb12d07c44..4e20b25a12d44de33165afbd67553119c2f21dda 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006, 2007
+/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -659,9 +659,7 @@ __tzfile_compute (time_t timer, int use_localtime,
              __tzname[1] = __tzstring (&zone_names[strlen (zone_names) + 1]);
            }
 
-         *leap_correct = 0L;
-         *leap_hit = 0;
-         return;
+         goto leap;
        }
       else
        {
@@ -762,6 +760,7 @@ __tzfile_compute (time_t timer, int use_localtime,
       tp->tm_gmtoff = info->offset;
     }
 
+ leap:
   *leap_correct = 0L;
   *leap_hit = 0;