From 477215fe7db5277f44fe35c5a600597bbf957fa0 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 26 Aug 2011 07:23:42 +0000 Subject: [PATCH] * libc/time/mktm_r.c (_mktm_r): Fix previous fix. --- newlib/ChangeLog | 4 ++++ newlib/libc/time/mktm_r.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index b9fbc82e6..cdda0cf04 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2011-08-26 Steven Abner + + * libc/time/mktm_r.c (_mktm_r): Fix previous fix. + 2011-08-24 Corinna Vinschen * libc/time/mktm_r.c (_mktm_r): Fix computing tm_year. diff --git a/newlib/libc/time/mktm_r.c b/newlib/libc/time/mktm_r.c index 9b9b411a5..c0ab2191a 100644 --- a/newlib/libc/time/mktm_r.c +++ b/newlib/libc/time/mktm_r.c @@ -182,7 +182,7 @@ _DEFUN (_mktm_r, (tim_p, res, is_gmtime), { res->tm_mon = 11; res->tm_year -= 1; - res->tm_yday = 364 + isleap(res->tm_year); + res->tm_yday = 364 + isleap(res->tm_year + 1900); } res->tm_mday = ip[res->tm_mon]; } @@ -254,4 +254,3 @@ _DEFUN (__tzcalc_limits, (year), return 1; } -