Skip to content

Commit

Permalink
Handle leap seconds even if no DST rule exists.
Browse files Browse the repository at this point in the history
This fixes BZ #10211.
  • Loading branch information
Akinori Hattori authored and Ulrich Drepper committed Jun 15, 2009
1 parent c9bb324 commit 2914340
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
7 changes: 3 additions & 4 deletions time/tzfile.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -762,6 +760,7 @@ __tzfile_compute (time_t timer, int use_localtime,
tp->tm_gmtoff = info->offset;
}

leap:
*leap_correct = 0L;
*leap_hit = 0;

Expand Down

0 comments on commit 2914340

Please sign in to comment.