[Python-Dev] tzset

Stuart Bishop zen@shangri-la.dropbear.id.au
Mon, 17 Mar 2003 14:51:42 +1100


On Sunday, March 16, 2003, at 04:07  PM, Tim Peters wrote:

> 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.

Yup. It sucks, but is the best there is. I can't even find proprietary
solutions for various Unix flavours. Maybe a post to Slashdot saying
Zope 3 will be Windows only due to limitations in POSIX would at least
get something for the free distros :-)

> I hope the community takes up the challenge of building a sane
> cross-platform time zone facility building on 2.3 datetime's tzinfo 
> objects.

A cross-platform time zone facility isn't a problem - the data we need 
is
available and maintained as part of numerous free Unix distributions. We
could even steal C code to decode it if we are particularly lazy.

The trick is that updates to coutries' timezone changes don't follow the
Python release schedule, and I think this was covered in depth on 
python-dev
not long ago in excruciating details that I'm sure no one wants to 
repeat :-)

So the actual problem would be how to distribute data file updates to 
Python
installations, which would also mean we could support the various ISO
standards relating to things like country codes and languages (which I'm
sure many of us are currently doing manually).

Possibly a script that could be run as the 
user-who-owns-the-python-installation
to update from source forge, which python-announce as the notification 
channel
when files are updated?

-- 
Stuart Bishop <zen@shangri-la.dropbear.id.au>
http://shangri-la.dropbear.id.au/