delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/06/09/01:51:28

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F57E388E820
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=H864f8Ui c=1 sm=1 tr=0 ts=60c05695
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=IkcTkHD0fZMA:10 a=8AHkEIZyAAAA:8 a=w_pzkKWiAAAA:8 a=yMhMjlubAAAA:8
a=uZvujYp8AAAA:8 a=tbFE_IfxFiSdXi-lcTQA:9 a=QEXdDO2ut3YA:10 a=otTE43H4AhkA:10
a=AomDDAB-fV4A:10 a=sRI3_1zDfAgwuvI8zelB:22 a=SLzB8X_8jTLwj6mN0q5r:22
To: cygwin AT cygwin DOT com
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> <daa04160-a8ad-ac49-5d19-b99c17e93d8a AT mail DOT ru>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Subject: Re: Python for Windows reports wrong local time when run under Cygwin
on Europe/Moscow TZ
Message-ID: <92dc21ea-0975-2c58-5c5c-f3d8962d34c6@SystematicSw.ab.ca>
Date: Tue, 8 Jun 2021 23:50:12 -0600
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: <daa04160-a8ad-ac49-5d19-b99c17e93d8a@mail.ru>
X-CMAE-Envelope: MS4xfIp/mfgndAw3+u28aI5goQPvE3nzD013/TGNirP8aTD4XLeU0Wr4pIpDzp8VbUgMgms0ccreLtzNLMPnvr1M7ocQZ1WSNlx3vfNaV4vfB2KLSPO3pFWP
RKzkJtol9rNEpnTX6RCllxBnhLwxNtLNH6rJPaAVExe8U/6/5DJoNI67LBA0HtMXg7HTLUTevap+/sAxzbXYPKRExXWyCN4ezGU=
X-Spam-Status: No, score=-3488.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no 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>
Reply-To: 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 1595pS05029848

On 2021-06-08 14:03, Mike Kaganski via Cygwin wrote:
> On 08.06.2021 16:04, L A Walsh wrote:
>> 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? 
> 
> FTR: filed https://bugs.python.org/issue44352.

See Keith Thompson subthread and my reply with suggested fix:

	https://cygwin.com/pipermail/cygwin/2021-June/248692.html

Windows does not recognize zoneinfo time zone identifiers in TZ only 
base format POSIX TZ strings with three alphabetic character identifiers:

	https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset?view=msvc-160

That assumes US switch date "rules": for all years up to current, or 
just DST, and whether pre- or post-2007 is unstated!

Otherwise it defaults to regional settings, used by Cygwin to map to 
zoneinfo time zone identifiers, so if Python for Windows could clear TZ 
before it is read by MSVCRT, it should DTRT.

Windows does not recognize expanded POSIX TZ format strings with <> 
quoted alphanumeric characters, "-", "+", and start and end dates/times:

	https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#bottom

which make them usable outside of the US.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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