[Python-Dev] tzset

Brett Cannon drifty@alum.berkeley.edu
Sun, 16 Mar 2003 15:25:15 -0800 (PST)


[Tim Peters]

> The cross-platform semantics of TZ are a joke.  The tests we have rely on
> non-standard extensions (viewing POSIX as the only definitive std here).
> Even if they stuffed colons at the front, POSIX leaves the interpretation of
> colon-initiated TZ values entirely up to the implementation:
>
>     If TZ is of the first format (that is, if the first character is a
>     colon), the characters following the colon are handled in an
>     implementation-defined manner.
>
> Worse, if the platform tzset() isn't happy with TZ's value, it has no way to
> tell you:  the function is declared void, and has no defined effects on
> errno.
>

If this thing is so broken, why are we bothering with it?  It's one thing
to want to give people access to facilities that do something useful; it's
another thing entirely to give them access to something that is broken.

Perhaps if we are going to bother to make this available the work should
be done to make it have more standard output?  So take whatever the C
function returns and then make it conform to some reasonable output.

-Brett