[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Why 1904?



gasster@pacificnet.net writes:
>I have been work with Perl on both my Mac and a Sun Workstation.
>The Unix Perl references the time epoch from Jan. 1, 1970, but
>MacPerl uses 1904.  I've looked in the docs and faqs, but
>it does not tell me why?

MacPerl uses 1904 because MacOS does. MacOS uses 1904 because

a) 1970 is too late a starting date if you intend to use these values for
   business data.
b) 1904 as a starting point had the advantage that you had simple leap year
   rules until 32 bit numbers run out (in 2038, I think). In 2000, as opposed
   to 1900, the 400 year rule cancels the 100 year rules.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "One fine day in my odd past..." -- Pixies, _Planet of Sound_