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

Mike Kaganski mikekaganski@mail.ru
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?

Cygwin:

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

Windows:

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 ...
>

[1] 
https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/2021-time-zone-updates-for-republic-of-south-sudan-now-available/ba-p/2234981


-- 

Best regards,

Mike Kaganski



More information about the Cygwin mailing list