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

Re: [MacPerl] "Epoch-making difference"--time()



> The tricky part about these principles is that ISO C doesn't define
> the Epoch to be used. POSIX.1 defines it as Jan 1, 1970, but all
> Mac compilers define it as Jan 1, 1904. I prefer in this case to
> follow the Mac precedent and have times returned by time, stat, and so
> on based on the 1904 date not the 1970 one. However, if the Perl5-
> porters mailing list rejects this view, I might reconsider.

I know that I fell into that trap when doing some dbm database stuff
in MacPerl that was to be run on a Unix machine. For some reason
the numbers just weren't matching up compared to what I was doing on
the Unix machine and I couldn't figure it out for like an hour until
I realized the 1904 date was being used instead.

Personally, I think that the 1970 date should be used so that there is
less confusion.

-jon

Jon (no h) S. Stevens        yanni@clearink.com
ClearInk WebMagus      http://www.clearink.com/
finger pgp@sparc.clearink.com for pgp pub key
If that sentence didn't seem to make sense, that's because it didn't.