Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 1995 16:42:32 PDT
From:      Bill Fenner <fenner@parc.xerox.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/747: date(1) gives weird time zones and interprets GMT[+-] backwards
Message-ID:  <199509272342.QAA10303@fenestro.parc.xerox.com>
Resent-Message-ID: <199509280000.RAA19243@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 27 17:00:01 PDT 1995
>Last-Modified:
>Originator:     Bill Fenner
>Organization:
Xerox PARC
>Release:        FreeBSD 2.1-STABLE i386
>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:
	
	

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509272342.QAA10303>