Re: tzset()

Guido.van.Rossum@cwi.nl
Thu, 16 Jun 1994 13:01:14 +0200

> I would be tempted to rewrite timemodule so that it could be
> reinitialized ( which may not be necessary, as my man pages
> say the tzset is implicitly called by ctime and localtime )
> but is there any other input to tzset() that the TZ environment
> variable ? Or is there any way to set an environment variable
> in the current process other that thru a shell ?

The most pragmatic way to solve this is probably to add a function
tzset("string") to the time module which forces TZ="string" in the
process's current environment and then calls the C tzset() again (and
reinitializes the Python variables that describe the timezone).

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>