How do I fix this test so it runs on Windows? (it uses tzset)

Nobody nobody at nowhere.com
Wed Jun 16 15:54:44 EDT 2010


On Wed, 16 Jun 2010 16:30:02 +0100, Chris Withers wrote:

> I'd like to make test_non_gmt_timezone at the bottom of 
> https://...
> run on Windows, any suggestions?

MSVCRT has _tzset(), which understands the TZ environment variable.

http://msdn.microsoft.com/en-us/library/90s5c885%28VS.80%29.aspx

For whatever reason, tython's "time" module doesn't provide the tzset()
function on Windows. However, you should be able to use it via ctypes.




More information about the Python-list mailing list