aboutsummaryrefslogtreecommitdiff
path: root/time/mktime.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-12-02 22:16:35 +0000
committerRoland McGrath <roland@gnu.org>2004-12-02 22:16:35 +0000
commitb78ad5fd49ddfbe2e74aa6f00afbe992399c0efe (patch)
treead9de354dd4974b1b62515e1e4458e8e642eaea8 /time/mktime.c
parent469dcb0d463740a3c15ef231ea110bf01bafbaa3 (diff)
downloadglibc-b78ad5fd49ddfbe2e74aa6f00afbe992399c0efe.tar
glibc-b78ad5fd49ddfbe2e74aa6f00afbe992399c0efe.tar.gz
glibc-b78ad5fd49ddfbe2e74aa6f00afbe992399c0efe.tar.bz2
glibc-b78ad5fd49ddfbe2e74aa6f00afbe992399c0efe.zip
* time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
convert T2, not T. * time/Makefile (tests): Add tst-mktime3. * time/tst-mktime3.c: New test. 2004-12-01 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'time/mktime.c')
-rw-r--r--time/mktime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/time/mktime.c b/time/mktime.c
index 280f5f47d5..c6ae56ee60 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -463,8 +463,9 @@ __mktime_internal (struct tm *tp,
t2 = t1 + sec_adjustment;
if (((t1 < t) != (sec_requested < 0))
| ((t2 < t1) != (sec_adjustment < 0))
- | ! (*convert) (&t, &tm))
+ | ! (*convert) (&t2, &tm))
return -1;
+ t = t2;
}
*tp = tm;