From are@communique.no  Wed Dec 10 14:24:38 1997
Received: from david.communique.no (ppp11.larris.ifi.uio.no [129.240.68.111])
          by hub.freebsd.org (8.8.7/8.8.7) with SMTP id OAA25126
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Dec 1997 14:24:33 -0800 (PST)
          (envelope-from are@communique.no)
Received: (qmail 4120 invoked by uid 1001); 9 Dec 1997 21:01:22 -0000
Message-Id: <19971209210122.4119.qmail@david.communique.no>
Date: 9 Dec 1997 21:01:22 -0000
From: are@communique.no
Reply-To: are@communique.no
To: FreeBSD-gnats-submit@freebsd.org
Subject: Wrong parsing of /bin/date (1) parameters
X-Send-Pr-Version: 3.2

>Number:         5269
>Category:       bin
>Synopsis:       Wrong parsing of /bin/date (1) parameters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brian
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 10 14:30:01 PST 1997
>Closed-Date:    Wed Dec 10 18:39:23 PST 1997
>Last-Modified:  Wed Dec 10 18:40:52 PST 1997
>Originator:     Are Bryne
>Release:        FreeBSD 2.2.5-STABLE i386
>Organization:
Communique DA
>Environment:

Last cvsup'ed all sources at Dec  3 23:24 CET, and did a make world
afterwards.

>Description:

date(1) says it takes the following command line arguments:

usage: date [-nu] [-d dst] [-r seconds] [-t west] [+format]
            [-v [+|-]val[ymwdHM]] ... [-f fmt date | [[[[yy]mm]dd]HH]MM[.ss]]

When supplying both a <format> and the -v option, I am required to swap
the placement to the opposite of what I'm told to do.

>How-To-Repeat:

% date +%y -v-1y
date: illegal time format

% date -v-1y +%y
96

>Fix:
	
Change the documentation, or parse the command line differently. If any change
is made to the parsing, it should perhaps accept both variants.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Wed Dec 10 16:07:12 PST 1997 
Responsible-Changed-Why:  
This is my fault (I added -v) 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Wed Dec 10 18:39:23 PST 1997 
State-Changed-Why:  
Fixed with date.c 1.22 and date.1 1.22. 
>Unformatted:
