Date: Mon, 6 Apr 1998 01:21:59 -0700 (PDT) From: Sean Adams <sadams@shell1.qpt.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/6223: PST/DST bug in /bin/date Message-ID: <199804060821.BAA09235@shell1.qpt.com>
next in thread | raw e-mail | index | archive | help
>Number: 6223
>Category: bin
>Synopsis: PST/DST bug in /bin/date
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Apr 6 01:30:01 PDT 1998
>Last-Modified:
>Originator: Sean Adams
>Organization:
QPT Networks
>Release: FreeBSD 2.2.5-RELEASE i386
>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
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804060821.BAA09235>
