about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2009-06-15 10:54:26 -0700
committerPetr Baudis <pasky@suse.cz>2009-06-16 00:11:52 +0200
commit0f1ea04f8ab3ad481089fd705f4bda2df0fd8078 (patch)
tree4d8f31f7d0e59b97a89ac16aef91e2b6bdfb9a84
parent9cf557216cbd0fe6e5ca235114c27260622d049b (diff)
downloadglibc-0f1ea04f8ab3ad481089fd705f4bda2df0fd8078.tar.gz
glibc-0f1ea04f8ab3ad481089fd705f4bda2df0fd8078.tar.xz
glibc-0f1ea04f8ab3ad481089fd705f4bda2df0fd8078.zip
Handle leap seconds even if no DST rule exists.
This fixes BZ #10211.
(cherry picked from commit 29143408ae6d474a115768e809691635f507b1fd)
-rw-r--r--ChangeLog7
-rw-r--r--time/tzfile.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ecf7c103c3..b79f020817 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +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>.
+
 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
 
 	* resolv/res_send.c (send_dg): Remember we switched to
diff --git a/time/tzfile.c b/time/tzfile.c
index 970022379a..4e20b25a12 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -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;