Python for Windows reports wrong local time when run under Cygwin on Europe/Moscow TZ

Mike Kaganski
Tue Jun 8 07:51:03 GMT 2021

On 08.06.2021 7:34, Russell VT wrote:
> What version(s) of the timezone files are installed on each?


> $ cygcheck -c | grep tz
> tzcode 2021a-1                         OK
> tzdata 2021a-1                         OK


I didn't find a TZ-specific update KB in the list of installed updates. 
However, I did check that there is a "(UTC+2:00) Juba" timezone in the 
Windows selector, as described in [1], which means that the respective 
TZ update (also described in KB4601275) is present on system.

> Also, seems one of the Python versions came from Windows, rather than 
> Cygwin?

Heh, I hoped that when I titled the original mail as "Python *for 
Windows* reports ... under Cygwin ...", and repeatedly mentioned that in 
the body, it's obvious that indeed, the problem is exactly running 
native Windows build of Python under cygwin:

>     But running Python *for Windows* (it doesn't matter which,
>     specifically
>     for the test I used the one *from MS Store* [1]), I have incorrect
>     local time:
>     ...
>     Starting the same Python *for Windows* from cmd.exe has it correct:
>     ...
>     This is a problem, because in our project (LibreOffice), we use
>     Cygwin
>     as environment for unit testing, where LibreOffice's own Python (also
>     *built natively for Windows*) is used, and at some times ...



Best regards,

Mike Kaganski

More information about the Cygwin mailing list