aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-16 14:18:39 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-16 14:18:39 +0000
commite2cceb5a74764ee34a2d84c0a875af9e381b99db (patch)
tree82c87521ae72b4644ac466491fe75c062859ce2a /time
parent8d137b60989f7c5d544bd6929e987dfe36acf25f (diff)
downloadglibc-e2cceb5a74764ee34a2d84c0a875af9e381b99db.zip
glibc-e2cceb5a74764ee34a2d84c0a875af9e381b99db.tar.gz
glibc-e2cceb5a74764ee34a2d84c0a875af9e381b99db.tar.bz2
(__tzfile_compute): For use_last case set i to num_transition rather than num_transitions - 1.
Diffstat (limited to 'time')
-rw-r--r--time/tzfile.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index 44d6614..d16115f 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -596,7 +596,7 @@ __tzfile_compute (time_t timer, int use_localtime,
if (tzspec == NULL)
{
use_last:
- i = num_transitions - 1;
+ i = num_transitions;
goto found;
}
@@ -666,7 +666,8 @@ __tzfile_compute (time_t timer, int use_localtime,
i = hi;
found:
- /* assert (timer >= transitions[i - 1] && timer < transitions[i]); */
+ /* assert (timer >= transitions[i - 1]
+ && (i == num_transitions || timer < transitions[i])); */
__tzname[types[type_idxs[i - 1]].isdst]
= __tzstring (&zone_names[types[type_idxs[i - 1]].idx]);
size_t j = i;