When Python is running under Windows, time.localtime does not report the correct time if the timezone is changed during the life time of the Python instance. Under Linux, ti
No, this can't be fixed without doing what you did. It is a bit absurd, but if you need the correct time zone in Windows and it has changed during the program's execution, it must be done.
This probably isn't a bug (the documentation is very clear that the tzset() function is only available on Unix). It's more likely a weakness in Windows that prevents the Python programmers from implementing tzset() under it. You can make a request for a feature enhancement, but it's been this way since Python 2.3 (7 years), so it's unlikely it will actually get implemented.