Bug 17250

Summary: Unclear language on date(1) manpage for -r option
Product: Documentation Reporter: Crist J. Clark <cjc>
Component: Books & ArticlesAssignee: Sheldon Hearn <sheldonh>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Crist J. Clark 2000-03-07 20:00:01 UTC
	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
Comment 1 Sheldon Hearn 2000-03-07 20:13:33 UTC
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.
Comment 2 Sheldon Hearn 2000-03-07 20:34:07 UTC
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
Comment 3 Sheldon Hearn freebsd_committer freebsd_triage 2000-03-07 20:34:18 UTC
Responsible Changed
From-To: freebsd-doc->sheldonh

I'll take this one. 

Comment 4 Crist J. Clark 2000-03-07 20:35:02 UTC
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
Comment 5 Sheldon Hearn freebsd_committer freebsd_triage 2000-03-07 20:56:29 UTC
State Changed
From-To: open->closed

Committed a fix in rev 1.34.  Merged to STABLE in rev 1.26.2.5. 
Thanks!