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.


Reply via email to