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

Mike Kaganski mikekaganski@mail.ru
Tue Jun 8 12:28:29 GMT 2021


On 08.06.2021 14:37, L A Walsh wrote:
> On 2021/06/06 23:59, Mike Kaganski via Cygwin wrote:
>> Hello,
>>
>> Running Cygwin 3.1.7-1 on Windows 10 Version 21H1 (OS Build 
>> 19043.985), I have this issue:
>>
>> when I start Cygwin's Python, I have correct time reported:
>>
>> 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
>
> Why are you reporting a problem in Windows-Python on a cygwin
> list, especially when the cygwin python runs correctly? Admittedly
> I'd be more interested to know what happened in perl, but doubt
> MS wants to try supporting that can of worms.
>
> ...
>
> Anyway, I assume you reported it here just to amuse cygwin users
> at MS's Win-Python?  ;-)

No, I report a problem that a native program runs incorrectly *under 
Cygwin*, because Cygwin is indeed part of the picture, and being not a 
prophet, I can't know in advance if the actual bug lies in Windows, in 
Python, or in Cygwin interaction with them. And I assume that Cygwin is 
not declaring that its users "must never run native applications from 
Cygwin", so I find that passage above inappropriate and off-topic.

> Though as to why -- likely the windows version is getting time zone
> clues + correction from BOTH cygwin and Windows, like it's told its
> in a TZ that is at 1 time, while Windows feeds it other data that
> says it is 2 hours off from the default. 
Maybe. It's OK if no one here knows the reason - I of course don't 
expect anyone here obliged to give an answer. My question was intended 
to ask if someone (e.g., a Cygwin dev) somehow can see the problem from 
their expertise, and - maybe - even know how to fix it. Maybe there's 
some technique how to workaround this problem - and even if it's not a 
Cygwin's bug, it still could be useful for Cygwin users, hence still the 
post to the list, accompanied by someone's workaround, would be 
reasonable and useful.


-- 

Best regards,

Mike Kaganski



More information about the Cygwin mailing list