From owner-freebsd-hackers Thu Mar 11 23:53: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 63E5C14BF2 for ; Thu, 11 Mar 1999 23:51:46 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony [10.0.0.6]) by rover.village.org (8.9.3/8.6.6) with ESMTP id HAA64258; Fri, 12 Mar 1999 07:51:27 GMT Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA16925; Fri, 12 Mar 1999 00:51:36 -0700 (MST) Message-Id: <199903120751.AAA16925@harmony.village.org> To: Florin Nicolescu Subject: Re: Y2K bug Cc: freebsd-hackers@FreeBSD.ORG (FreeBSD-hackers) In-reply-to: Your message of "Fri, 12 Mar 1999 09:31:13 +0200." <199903120731.JAA11891@nick.ro> References: <199903120731.JAA11891@nick.ro> Date: Fri, 12 Mar 1999 00:51:35 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199903120731.JAA11891@nick.ro> Florin Nicolescu writes: : According to the discontinuities in the earth move around the sun, : once a four years there is inserted an extra day (29 of February), : but once a 400 years (when the first 2 digits of the year divide by : 4) it is not added. This is the case for 2000 (20 mod 4 = 0). When I : inserted the date 29 of February 2000 in FreeBSD, it has accepted it : OK, meaning that it believes that 2000 has the date 29 of Feb. I : don't know about other systems, but I know that a lot of people : ignore this rule (I've just looked into my agenda, and it has the : same error). Feb 29, 2000 is a leap year. Your leap year rule is wrong. The correct rule is as follows if (year is divisible by 4) -> leap year unless also divisible by 100 -> not a leap year (eg 1900) unless also divisible by 400 -> leap year (eg 2000) FreeBSD (and most systems) handles this correctly. It is not a bug. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message