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