From fenner@parc.xerox.com  Wed Sep 27 16:51:33 1995
Received: from alpha.xerox.com (alpha.Xerox.COM [13.1.64.93])
          by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id QAA19107
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 27 Sep 1995 16:51:33 -0700
Received: from fenestro.parc.xerox.com ([13.0.208.199]) by alpha.xerox.com with SMTP id <15264(2)>; Wed, 27 Sep 1995 16:50:52 PDT
Received: (from fenner@localhost) by fenestro.parc.xerox.com (8.6.12/8.6.9) id QAA10303; Wed, 27 Sep 1995 16:42:32 -0700
Message-Id: <199509272342.QAA10303@fenestro.parc.xerox.com>
Date: Wed, 27 Sep 1995 16:42:32 PDT
From: Bill Fenner <fenner@parc.xerox.com>
Reply-To: fenner@parc.xerox.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: date(1) gives weird time zones and interprets GMT[+-] backwards
X-Send-Pr-Version: 3.2

>Number:         747
>Category:       bin
>Synopsis:       date(1) gives weird time zones and interprets GMT[+-] backwards
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 27 17:00:01 PDT 1995
>Closed-Date:    Sun Sep 15 09:05:09 PDT 1996
>Last-Modified:  Sun Sep 15 09:07:02 PDT 1996
>Originator:     Bill Fenner
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
Xerox PARC
>Environment:

	
2.1-STABLE supped on September 22

>Description:

	
"date" prints out strange time zones when you set the TZ environment variable,
and unless I am in total outer space, interprets GMT+7 as it should GMT-7.

>How-To-Repeat:

	
% env TZ=GMT date
Wed Sep 27 23:28:33  1995

Where did the time zone go?

% env TZ=GMT-7 date
Thu Sep 28 06:31:58 GMT 1995

Last I checked, Pacific time was GMT-7.  However, this time is
14 hours ahead of now.  Plus, the time zone that gets printed is
"GMT" -- not GMT-7.

% date
Wed Sep 27 16:32:00 PDT 1995

This is now; in my time zone, I feel safe here.

% env TZ=GMT+7 date
Wed Sep 27 16:32:06 GMT 1995

And if I check what the time is supposed to be in GMT+7, it turns out
to be the same as Pacific time, even though we are GMT-7.

The same commands when run under SunOS provide the following output:

% env TZ=GMT date
Wed Sep 27 23:38:25 GMT 1995
% env TZ=GMT-7 date
Wed Sep 27 16:38:27 GMT-0700 1995
% date
Wed Sep 27 16:38:29 PDT 1995
% env TZ=GMT+7 date
Thu Sep 28 06:38:32 GMT+0700 1995

>Fix:
	
	

>Release-Note:
>Audit-Trail:

From: "Garrett A. Wollman" <wollman@lcs.mit.edu>
To: fenner@parc.xerox.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: bin/747: date(1) gives weird time zones and interprets GMT[+-] backwards
Date: Thu, 28 Sep 1995 10:17:36 -0400

 <<On Wed, 27 Sep 1995 16:42:32 PDT, Bill Fenner <fenner@parc.xerox.com> said:
 
 > % env TZ=GMT date
 > Wed Sep 27 23:28:33  1995
 
 > Where did the time zone go?
 
 `GMT' is not a valid time zone specification.
 
 > % env TZ=GMT-7 date
 > Thu Sep 28 06:31:58 GMT 1995
 
 `GMT-7' is a valid timezone specification which specifies a zone name
 of `GMT' and an offset of seven hours /ahead/ of Greenwich.
 
 wollman@khavrinen(310)$ TZ=Etc/GMT date
 Thu Sep 28 14:17:00 GMT 1995
 wollman@khavrinen(311)$ TZ=Etc/GMT-7 date
 Thu Sep 28 21:17:08 GMT-7 1995
 
 -GAWollman
 
 --
 Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
 wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
 Opinions not those of| It is a bond more powerful than absence.  We like people
 MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant
State-Changed-From-To: open->closed 
State-Changed-By: wosch 
State-Changed-When: Sun Sep 15 09:05:09 PDT 1996 
State-Changed-Why:  
It's not a bug, it's POSIX. See src/src/share/zoneinfo/etcetera. 
>Unformatted:
