Subject: lib/5158: I think we misuse 'isleap()' in localtime.c
To: None <email@example.com>
From: Peter Seebach <firstname.lastname@example.org>
Date: 03/12/1998 22:17:02
>Synopsis: isleap appears to be called on tm_year, which is off by 1900
>Responsible: lib-bug-people (Library Bug People)
>Arrival-Date: Thu Mar 12 22:20:01 1998
>Originator: Peter Seebach
System: NetBSD puddle.plethora.net 1.3C NetBSD 1.3C (PUDDLE) #0: Fri Feb 6 11:13:44 CST 1998 email@example.com:/mud/src/sys/arch/i386/compile/PUDDLE i386
Reading localtime.c, it really looks to me as though 'isleap()' (the macro
for detecting leap years) is being called on the 'tm_year' structure member.
Unfortunately, that's off by 1900 for the '%400' test.
Read the code.
Double-check this, and possibly add '+1900' to the %400 check.