| Summary: | Unclear language on date(1) manpage for -r option | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Crist J. Clark <cjc> | ||||
| Component: | Books & Articles | Assignee: | Sheldon Hearn <sheldonh> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
On Tue, 07 Mar 2000 14:58:34 EST, "Crist J. Clark" wrote:
> -r Print out the date and time in seconds from the Epoch.
>
> Which to me sounds like it is going to return the time in that
> form.
You're right, our manual page is confusing. I prefer what the NetBSD
manual page has to what you propose in your patch:
.It Fl r
Print out the date and time that is
.Ar seconds
from the Epoch.
Would you be happy with that?
Ciao,
Sheldon.
On Tue, 07 Mar 2000 15:35:02 EST, "Crist J. Clark" wrote:
> It works for me, but I wonder if somewhere in the page, if not there,
> we should have a definition of "the Epoch" for those who may not be
> aware of the cosmic sigificance of Jan 1 00:00:00 UTC 1970.
Okay. I was hoping to keep in line with NetBSD, but you're right about
this, so hopefully they'll consider our extension to their patch. :-)
Ciao,
Sheldon
Responsible Changed From-To: freebsd-doc->sheldonh I'll take this one. On Tue, Mar 07, 2000 at 10:13:33PM +0200, Sheldon Hearn wrote: > > > On Tue, 07 Mar 2000 14:58:34 EST, "Crist J. Clark" wrote: > > > -r Print out the date and time in seconds from the Epoch. > > > > Which to me sounds like it is going to return the time in that > > form. > > You're right, our manual page is confusing. I prefer what the NetBSD > manual page has to what you propose in your patch: > > .It Fl r > Print out the date and time that is > .Ar seconds > from the Epoch. > > Would you be happy with that? It works for me, but I wonder if somewhere in the page, if not there, we should have a definition of "the Epoch" for those who may not be aware of the cosmic sigificance of Jan 1 00:00:00 UTC 1970. -- Crist J. Clark cjclark@home.com State Changed From-To: open->closed Committed a fix in rev 1.34. Merged to STABLE in rev 1.26.2.5. Thanks! |
The '-r' option for the date(1) command reads in the manpage, -r Print out the date and time in seconds from the Epoch. Which to me sounds like it is going to return the time in that form. However, what that is supposed to mean is that the UNIX Epoch time in seconds is takenn as the argument and printed out in the default format or whatever format the user has specified with a '+format' argument. Fix: I think the simple change from 'in' to 'at' in the above quote from the manpage should do it, but add a few more words on the UNIX Epoch to aid the uninitiated since it comes up no where else on this manpage. How-To-Repeat: % date -r 0 Wed Dec 31 19:00:00 EST 1969 % date -r 0 +%m/%d/%y 12/31/69 % date -r 0 +%s 0 % man date