Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 1997 14:56:21 +0930 (CST)
From:      Greg Lehey <grog@lemis.com>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        grog@lemis.com, brian@awfulhak.org, hackers@FreeBSD.ORG
Subject:   Re: date(1)
Message-ID:  <199708010526.OAA08967@freebie.lemis.com>
In-Reply-To: <28422.870412711@time.cdrom.com> from "Jordan K. Hubbard" at "Jul 31, 97 10:18:31 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Jordan K. Hubbard writes:
>> Now here's an enhancement that I *would* like to see: specify a
>> timezone file to use.  Something like:
>>
>>   $ date -z /usr/share/zoneinfo/Asia/Tokyo
>>
>> to give you the current time in Tokyo.
>
> Blah.  What's wrong with:
>
> jkh@time-> TZ=Asia/Tokyo date
> Fri Aug  1 14:18:15 JST 1997
>
> ?

The documentation's inadequate.  Sure, it points to environ(7), but
since TZ is almost never used in BSD, there's a tendency to think
it'll be like a System V TZ, which is completely different.  How about
adding:

--- /usr/share/man/man1/date.1.orig     Fri Aug  1 04:13:12 1997
+++ /usr/share/man/man1/date.1  Fri Aug  1 14:54:38 1997
@@ -171,6 +171,11 @@
 .Bl -tag -width Ds
 .It Ev TZ
 The timezone to use when displaying dates.
+The normal format is a pathname relative to
+.Dq Pa /usr/share/zoneinfo .
+For example, the command
+.Dq env TZ=America/Los_Angeles date
+displays the current time in California.
 See
 .Xr environ 7
 for more information.



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