bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tzset: add native Windows workaround


From: Marco Atzeri
Subject: Re: tzset: add native Windows workaround
Date: Wed, 3 May 2017 17:56:51 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/05/2017 17:24, Paul Eggert wrote:
On 05/03/2017 04:31 AM, Ken Brown wrote:
Perhaps the Cygwin folks could be talked into changing an unset TZ to
mean "ask the Windows Control Panel".

This seems to already be happening.  Here's what I see on my Cygwin
system:

$ echo $TZ
America/New_York

$ date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 07:29:03 -0400 (EDT)

$ TZ= date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 11:29:14 +0000 (GMT)

$ unset TZ

$ date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 07:29:30 -0400 (EDT)

Hmm, but is the last output line because the Windows Control Panel
specifies New York time, or because there is a 'localtime' file
maintained by Cygwin that specifies New York time? I'm guessing the
latter, since that's what glibc does. The former is what Bruno is asking
for.


It is linked to Windows Control Panel, changing it to different
settings I have in the same Cygwin session :

 $ unset TZ

 $ date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 17:51:52 +0200 (WEDT)

 $ date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 18:53:26 +0300 (TST)

 $ date +'%Y-%m-%d %H:%M:%S %z (%Z)'
2017-05-03 22:53:46 +0700 (SEAST)

Regards
Marco



reply via email to

[Prev in Thread] Current Thread [Next in Thread]