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: Ken Brown
Subject: Re: tzset: add native Windows workaround
Date: Wed, 3 May 2017 07:31:47 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1

On 5/3/2017 1:18 AM, Paul Eggert wrote:
Bruno Haible wrote:

Only for Cygwin, an empty or absent TZ environment variable means GMT.

That's weird; I don't know of any other system that does that. In many systems, an empty but set TZ means UTC0 without leap seconds; but an unset TZ typically means "ask the file system for the time zone", e.g., /etc/localtime or something like that. 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)

Ken



reply via email to

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