Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Apr 1999 23:10:31 +1000
From:      Greg Black <gjb-freebsd@gba.oz.au>
To:        Greg Lehey <grog@lemis.com>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Timezone question 
Message-ID:  <19990407131032.15954.qmail@alpha.comkey.com.au>
In-Reply-To: <19990406090912.V2142@lemis.com>  of Tue, 06 Apr 1999 09:09:12 %2B0930
References:  <19990404044642.A60884@sr.se> <19990404132026.T2142@lemis.com> <19990405005423.480.qmail@alpha.comkey.com.au> <19990406090912.V2142@lemis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >>   $ date
> >>   Sun Apr  4 13:09:34 CST 1999
> >>   $ TZ=Europe/Stockholm date
> >>   Sun Apr  4 05:39:43 CEST 1999
> >>   $ TZ=America/Chicago date
> >>   Sat Apr  3 21:39:54 CST 1999
> >>
> >> Note the imaginative time zone abbreviations, some of which I think
> >> are just plain wrong.
> >
> > It could be argued that date(1) is wrong to display those
> > alphabetic timezones and that it ought to change over to the
> > same numeric form that is now almost universally used in email
> > date headers:
> >
> >     $ gbdate
> >     Mon, 05 Apr 1999 10:47:12 +1000
> >     $ TZ=Europe/Stockholm gbdate
> >     Mon, 05 Apr 1999 02:47:14 +0200
> >     $ TZ=America/Chicago gbdate
> >     Sun, 04 Apr 1999 19:47:24 -0500
> 
> It could be argued.  Notice that the sign here is the inverse of what
> System V does in its time zones (we're -9.5, the (continental) USA is
> between +4 and +7).

The sign I showed there is the widely-accepted form used in
email date headers, and has nothing to do with SysV/BSD
differences.

> > This tells readers, both human and automated, exactly which
> > timezone we're talking about
> 
> Well, no, it tells the offset of the time zone from UTC, no more.  It
> doesn't say, for example, that I'm in South Australia, which has DST,
> and not in NT, which doesn't.

Presumably you know where you are and what the time is.  The
point here is for other people to know what the clock on your
wall is saying and how to convert that to the their local
time. This is provided by the numeric timezones, and poorly or
not at all by the alphabetic ones.  (And nobody else actually
cares if your wall clock time is daylight savings or not.)

> It would probably be good to output both time zone name and current
> offset:
> 
>   $ TZ=Europe/Lisbon date
>   Tue Apr  6 00:38:00 WEST 1999 (+0100)
>   $ TZ=Europe/London date
>   Tue Apr  6 00:38:04 BST 1999 (+0100)

Yes, I'd go along with that, provided it was changed around to
follow the existing precedent with email date headers, which
would give something like:

    Wed, 07 Apr 1999 23:06:32 +1000 (EST)

But hey, it was only a suggestion ...

-- 
Greg Black <gjb@acm.org>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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