[Zope3-dev] The Date Time and TimeZone question

Lennart Regebro lennart@torped.se
Sat, 16 Mar 2002 20:38:29 +0100


From: "Tim Peters" <tim@zope.com>
> and even the 2001 revision of the POSIX/Single Unix Specification
> standard (IEEE Std 1003.1-2001) leaves the meaning of a negative time_t
> undefined, and specifically warns that time_t still needn't be able to
> represent dates beyond 2038.

As I have understood nobody here favours the time_t format for storing
timedates (at least I have seen nobody arguing that time_t should be used).
So, as I understand it, that formats limitations doesn't apply here, since
it will not be used.

> There are no functions for datetime arithmetic defined in C that don't
> require going through time_t, so that kills any hope of using standard C
> functions for years outside of 1970-2038.  Any specific implementation of
C
> may allow for more than that, but there's not even a standard way to
> determine whether one does.

Please check out the tz/zoneinfo library. It's the one that handles
timezones, and is as far as I know included in most unices today. Again, I
haven't read the code for this (I haven't done time zone stuff under unix)
so I don't know how useful it is, but it seems weird to have a library that
specifies timezone information back to 19th century if the API's doesn't
support using it.
Still, weirder things been known to happen. :-)

No, it's not a standard c library, but as you said, UNIX!=C. :-)