From 87904ba261d5430cde0d29978dd3bbd4a181808e Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 15 Jan 1998 21:39:15 +0000 Subject: Error reported by Duncan Smith : >> >>There is a 30 day error in _TOD_Days_since_last_leap_year[2..3] >> > >> >Thanks. >> >What's the condition to hit this error? >> >Every year 4n+2 and 4n+3 ? >> >(i.e. 1998, 1999, 2002, 2003, ...) >> > >> OK: 96 97 00 01 04 05 ... >> Bad: 98 99 02 03 06 07 ... There is also a problem in newlib 1.7.x reported at the same time: >> I found another, that would strike only on 2/29/2000, or other leapyears. >> Only a problem on 1 day. >> >> Joel: FYI, there is a bug in Newlib localtime.c, localtime or (_tm_time). >> Ours is modified for dst and timezones, but the bug was in original source. >> I have not looked at the latest public source (nor do I know where to find >> it). --- cpukit/score/include/rtems/score/tod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/score/include') diff --git a/cpukit/score/include/rtems/score/tod.h b/cpukit/score/include/rtems/score/tod.h index 6c1e9d0e57..e0ed1e51ca 100644 --- a/cpukit/score/include/rtems/score/tod.h +++ b/cpukit/score/include/rtems/score/tod.h @@ -145,7 +145,7 @@ const unsigned16 _TOD_Days_to_date[2][13] = { * year otherwise. */ -const unsigned16 _TOD_Days_since_last_leap_year[4] = { 0, 366, 761, 1126 }; +const unsigned16 _TOD_Days_since_last_leap_year[4] = { 0, 366, 731, 1096 }; #else -- cgit v1.2.3