[Pythonmac-SIG] time screwed up

Rob Managan managan@llnl.gov
Wed, 19 Apr 2000 17:10:54 -0700


At 3:51 PM -0700 4/19/00, John W Baxter wrote:
>
>You are short 86400 seconds with that adjustment:  1900 was a leap year
>(discounting the few countries which were still on the Julian calendar
>then).  But you're right...doing it in a class is the right way.
>
I beg to differ John, but only since I almost said the same. The 
Gregorian calendar has century years are not leap years unless the 
century is divisible by 4. So 1700, 1800, and 1900 were not leap 
years but 2000 is a leap year.

I have heard that the reason Apple chose 1904 as its time epoch is 
that every 4th year would be a leap year. That is based on counting 
seconds in a 32 bit integer. Since that runs out of room in about 
2040 they would not have to include code to consider leap year 
exceptions like 2100.

-- 
*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-
Rob Managan       <mailto://managan@llnl.gov>
LLNL                      ph:  925-423-0903
P.O. Box 808, L-095       FAX: 925-422-3389
Livermore, CA  94551-0808