Author eryksun
Recipients belopolsky, eryksun, mikekaganski, p-ganssle, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-06-10.04:31:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 2. Execute 'set TZ=Europe/Moscow'

The Windows C runtime supports a simple format for the TZ environment variable, which is detailed in the documentation of _tzset() [1]. For example, it's "MSK-3" for Moscow Standard Time. It's -3 because the offset is from local time to UTC. 

The CRT does not verify that the TZ value is valid. "Europe/Moscow" is invalid, but it's blindly parsed anyway. There's no UTC offset, so it defaults to UTC (0 offset). It's parsed as supporting daylight saving time, according to U.S. rules. Currently this corresponds to UTC + 1. That's why there's a -2 hour delta from Moscow Standard Time, which does not observe daylight saving time.

I recommend that you unset the TZ environment variable before running Windows Python. Use the system timezone.

Date User Action Args
2021-06-10 04:31:36eryksunsetrecipients: + eryksun, paul.moore, belopolsky, tim.golden, zach.ware, steve.dower, p-ganssle, mikekaganski
2021-06-10 04:31:36eryksunsetmessageid: <>
2021-06-10 04:31:36eryksunlinkissue44352 messages
2021-06-10 04:31:35eryksuncreate