delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/06/08/09:30:56

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 971C0395445A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1623159054;
bh=RBiI+O25z3ZQAdgYVrIUj5zOuSey+jcsOh3yBX08WRc=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=cPEetPrOVzSxuEauY66iJSLZIm+mLHcwmdiy6r0m23t1AeN+1y4fadZx33lpD15Dj
5I3Zx4JU6qlO8WOuEaTM4XdYx/oF5Yx/gycfqf0zKPjatn7Z+kSzH8Jen2dxl2e5lg
NLcwaRet+SQPGtPRWss76ZqyPhLO1eDnG8PWDogs=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3541E383D011
Subject: Re: Python for Windows reports wrong local time when run under Cygwin
on Europe/Moscow TZ
To: L A Walsh <cygwin AT tlinx DOT org>
References: <5542c19d-8b1a-1f28-2003-fe9493ee9b56 AT mail DOT ru>
<60BF5677 DOT 9060904 AT tlinx DOT org> <97024d79-16b2-98a0-d20a-b3e6915ad0d0 AT mail DOT ru>
<60BF6ADB DOT 304 AT tlinx DOT org>
Message-ID: <318a3022-34a8-c9bc-a020-2067e244cd04@mail.ru>
Date: Tue, 8 Jun 2021 16:30:17 +0300
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <60BF6ADB.304@tlinx.org>
X-7564579A: 646B95376F6C166E
X-77F55803: 4F1203BC0FB41BD9D5B0DA836B685C543EF5F9E25E4001B3518B676B8BE4A4C7182A05F53808504024DF915CBED7E6CBC7CB9300FBA9A323ADA1FABAD1A321AFA7870383FFB3D2DD
X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F1942E6D70B4A2F0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637889C00975665ABF68638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D891488255D6A5AE9DF9F51B4250F0E9FA6F9789CCF6C18C3F8528715B7D10C86878DA827A17800CE7B24B16DE58C70C409FA2833FD35BB23D9E625A9149C048EE33AC447995A7AD18C26CFBAC0749D213D2E47CDBA5A96583BD4B6F7A4D31EC0BC014FD901B82EE079FA2833FD35BB23D27C277FBC8AE2E8B974A882099E279BDA471835C12D1D977C4224003CC836476EB9C4185024447017B076A6E789B0E975F5C1EE8F4F765FC6DD0AC0B96A293913AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F7900637E6ADEA1056C32FF8EC76A7562686271EEC990983EF5C03292E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C36174550A02D153F535872C767BF85DA2F004C90652538430E4A6367B16DE6309
X-C1DE0DAB: 0D63561A33F958A581FB6EB0839E039195E96628B8E7F06721ABE2073E47F144D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75A42E9C66FC9EA4CF410CA545F18667F91A7EA1CDA0B5A7A0
X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3435BBF0AC4E3A921C7EFBC38E21CB260857C4F47CA101E7432D74F7F4BC42BB026788F1DEA714FD071D7E09C32AA3244C907C012E55AA76001EFD2F5B1406577FC86C126E7119A0FE729B2BEF169E0186
X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojvdTwgM2ZyZnFCf0Lhds+dg==
X-Mailru-Sender: 00097D31F91C944B962E58D352881757082C21653C9ABAF4E388C746B6323290D586A72D9E53DC1D8D3DB682BF6F1158E66B5C1DBFD5D09D046C2275A8D60F931CD745D6427E807167EA787935ED9F1B
X-Mras: Ok
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00, BODY_8BITS,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM,
NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Mike Kaganski via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Mike Kaganski <mikekaganski AT mail DOT ru>
Cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 158DUtg4014310

On 08.06.2021 16:04, L A Walsh wrote:
> On 2021/06/08 05:28, Mike Kaganski wrote:
>>
>> No, I report a problem that a native program runs incorrectly *under 
>> Cygwin*, because Cygwin is indeed part of the picture.
> ---
>     The problem is in the MS-Win term program.  If you report
> it to them and tell them it only misbehaves when you have a 3rd
> party app injecting "dll's" (libraries) into the MS-program, they
> will _likely_ tell you that they can't support every 3rd party
> program that injects libraries into MS programs, and they can only
> support you running it without the 3rd party programs.

First of all - please stop telling me that I required support. I didn't 
demand anything, and was asking *in the hope*, but without any wrong 
expectations that anyone owes anything here. I never claimed that 
someone must support my use case - so please, please stop answering what 
wasn't said. I am a free software developer, working on LibreOffice 
project; I know what free software is, and what mailing list is. That 
they don't support something doesn't mean it's inappropriate to ask with 
a hope, a question that could be *possibly* answered, and which answer 
could happen to be helpful also to others.

>     Just like cygwin devs have noticed that various
> other programs (see 
> BLODA:https://cygwin.com/faq/faq.html#faq.using.bloda )
> are known for causing problems in cygwin.  The cygwin devs can't
> support all the 3rd party programs that interfere.

See above.

>> 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. 
> ---
>     As I said before, python is probably picking up time-zone
> changes from _both_ cygwin and windows.  The workaround is to use
> the appropriate version of python with the correct OS.  Cygwin is
> an OS emulation, Win10 is another OS.  They both have versions of
> python designed for them.  If MS thought the cygwin version of python
> was good enough for every purpose, they wouldn't have issued their
> own version.

MS didn't. The native Windows builds of Python weren't from MS - they 
were from LibreOffice and from Python Software Foundation, as described 
in the initial mail (and at the sites linked there).

>     You might ask on a python list if anyone else has experienced
> something similar with python or any other program.  I'm fairly sure
> that neither MS nor cygwin design their OS with python in mind and
> that it is python that is interacting funny when running under some
> merge of both.  Have you asked the python people about this problem?
> What did they suggest?

I will ask at Python, of course. I didn't yet, because I didn't want to 
cross-post same question to many places, and am waiting until it's clear 
that I need to ask there, not here.

>
>> 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.
> ---
>     Just because they don't tell you to never run linux apps
> directly in cygwin doesn't mean they support it if you insist on 
> trying.  Most devs won't tell you all the things you can't do, because
> that list is endless.  That certainly doesn't suggest that they would
> support all the things that don't work.

See above.

>
>>
>>> 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.
> ----
>     When you say you run the Win python on cygwin, what do you
> mean?

I mean "start Cygwin terminal - either C:\cygwin64\bin\mintty.exe, or 
C:\cygwin64\Cygwin.bat; then start Python using a command line as 
provided in the initial mail - I have provided there a full command line 
with the path".

>   ... I just ran python from windows (not the same version you
> have, but an old one python2.7.  I ran it from bash, but the resulting
> python doesn't have any cygwin libraries loaded -- that tells me that 
> python is looking at some absolute paths and the environment and picking
> up both -- it's a MS-python "bug".
> Look in its environment and remove any thing for timezone and try that.

I will try without TZ.

> Or look in your path and make sure there are no cygwin directories
> in the path that your win-python is using.  I'm pretty sure that
> will solve your problem.
>
> FWIW, here is a list of what python running from 'bash.exe' from
> cygwin has loaded -- and none of it is from cygwin:
>
> /prog/Sysinternals/cmd/exe> Listdlls python

Indeed there's no Cygwin's DLLs reported.


-- 

Best regards,

Mike Kaganski


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019