'How detect timezone change in Python?
I've got a Windows console Python application that for various unpleasant reasons has to use Python 2.7.
There are a lot of timing-related actions going on, and recently we had a bug occur when the program was running when the daylight savings switch occurred. Upon further testing and investigating, I'm seeing that the timezone information is cached, and the application has to call reload_localzone() when appropriate to get the new timezone information.
How does my Python app know that timezone info has changed? There's a Windows WM_TIMECHANGED event, but since it's a console app I don't know if I have any way to receive that message.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
