From sadams@shell1.qpt.com  Mon Apr  6 01:22:02 1998
Received: from shell1.qpt.com (sadams@shell1.qpt.com [170.1.194.9])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA21331
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 6 Apr 1998 01:22:01 -0700 (PDT)
          (envelope-from sadams@shell1.qpt.com)
Received: (from sadams@localhost)
	by shell1.qpt.com (8.8.7/8.8.7) id BAA09235;
	Mon, 6 Apr 1998 01:21:59 -0700 (PDT)
	(envelope-from sadams)
Message-Id: <199804060821.BAA09235@shell1.qpt.com>
Date: Mon, 6 Apr 1998 01:21:59 -0700 (PDT)
From: Sean Adams <sadams@shell1.qpt.com>
Reply-To: sadams@shell1.qpt.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: PST/DST bug in /bin/date
X-Send-Pr-Version: 3.2

>Number:         6223
>Category:       bin
>Synopsis:       PST/DST bug in /bin/date
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr  6 01:30:01 PDT 1998
>Closed-Date:    Tue Apr 4 19:00:37 PDT 2000
>Last-Modified:  Tue Apr  4 19:00:58 PDT 2000
>Originator:     Sean Adams
>Release:        FreeBSD 2.2.5-RELEASE i386
>Organization:
QPT Networks
>Environment:

cron script running date command with 10 minute adjustment

>Description:

When my cron job ran the following date command on 
Sun, 5 Apr 1998 03:01:00 -0700 (PDT), it died:

/bin/date -v -10M +%Y.%m.%d.%H.%M

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

Obviously, this is due to the PST/DST shift which occurred at 2:00PST. It didn't
have a serious impact - I just lost some statistics samples, but it would be 
nice if date could do the adjustment properly regardless of the "missing" hour.

>How-To-Repeat:

Run the date command with a -10M adjustment just after the switch to DST.

>Fix:
	
The correct output for /bin/date -v -10M +%Y.%m.%d.%H.%M run on
Sun, 5 Apr 1998 03:01:00 -0700 (PDT), would be:

1998.04.05.01.51
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Mon Apr 6 16:13:52 PDT 1998 
Responsible-Changed-Why:  
I did the -v switch.... I'll look at it when I get a chance 
(unless someone else wants to send patches.....;-) 
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Wed Apr 15 10:57:43 PDT 1998 
State-Changed-Why:  
->suspended. 


Responsible-Changed-From-To: brian->freebsd-bugs 
Responsible-Changed-By: phk 
Responsible-Changed-When: Wed Apr 15 10:57:43 PDT 1998 
Responsible-Changed-Why:  
->suspend 
State-Changed-From-To: suspended->closed 
State-Changed-By: brian 
State-Changed-When: Tue Apr 4 19:00:37 PDT 2000 
State-Changed-Why:  
Fixed with vary.c v1.9 
>Unformatted:
