public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mike Kaganski <mikekaganski@mail.ru>
To: L A Walsh <cygwin@tlinx.org>
Cc: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: Python for Windows reports wrong local time when run under Cygwin on Europe/Moscow TZ
Date: Tue, 8 Jun 2021 16:30:17 +0300	[thread overview]
Message-ID: <318a3022-34a8-c9bc-a020-2067e244cd04@mail.ru> (raw)
In-Reply-To: <60BF6ADB.304@tlinx.org>

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


  reply	other threads:[~2021-06-08 13:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  6:59 Mike Kaganski
2021-06-08  4:34 ` Russell VT
2021-06-08  7:51   ` Mike Kaganski
2021-06-08 11:37 ` L A Walsh
2021-06-08 12:28   ` Mike Kaganski
2021-06-08 13:04     ` L A Walsh
2021-06-08 13:30       ` Mike Kaganski [this message]
2021-06-08 13:57         ` L A Walsh
2021-06-08 14:10           ` Mike Kaganski
2021-06-08 14:15             ` L A Walsh
2021-06-08 13:36       ` Mike Kaganski
2021-06-08 20:03       ` Mike Kaganski
2021-06-09  5:50         ` Brian Inglis
2021-06-11  6:01   ` Mike Kaganski
2021-06-08 17:37 Keith Thompson
2021-06-09  3:43 ` Brian Inglis
2021-06-09 22:31 ` Keith Thompson
2021-06-10  2:36   ` Brian Inglis
2021-06-10 14:57     ` Ken Brown
2021-06-10 15:25       ` KAVALAGIOS Panagiotis (EEAS-EXT)
2021-06-10 18:31       ` Brian Inglis
2021-06-10 19:50         ` Ken Brown
2021-06-11  5:38           ` ASSI
2021-06-11 13:38             ` Ken Brown
2021-06-11 17:33           ` Brian Inglis
2021-06-11 18:05             ` Ken Brown
2021-06-12 16:34               ` Brian Inglis
2021-06-12 22:44                 ` Ken Brown
2021-06-11 10:51     ` Andrey Repin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=318a3022-34a8-c9bc-a020-2067e244cd04@mail.ru \
    --to=mikekaganski@mail.ru \
    --cc=cygwin@cygwin.com \
    --cc=cygwin@tlinx.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).