From owner-freebsd-questions Fri Feb 18 15:35: 4 2000 Delivered-To: freebsd-questions@freebsd.org Received: from zippy.cdrom.com (zippy.cdrom.com [204.216.27.228]) by hub.freebsd.org (Postfix) with ESMTP id BBBAD37BAB5; Fri, 18 Feb 2000 15:34:59 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) Received: from zippy.cdrom.com (jkh@localhost [127.0.0.1]) by zippy.cdrom.com (8.9.3/8.9.3) with ESMTP id PAA07784; Fri, 18 Feb 2000 15:34:45 -0800 (PST) (envelope-from jkh@zippy.cdrom.com) To: Alfred Perlstein Cc: keith@mail.telestream.com, freebsd-questions@FreeBSD.ORG, jkh@FreeBSD.ORG Subject: Re: Request for commit to 4.0. Re: Odd date output In-reply-to: Your message of "Fri, 18 Feb 2000 15:46:14 PST." <20000218154614.Z21720@fw.wintelcom.net> Date: Fri, 18 Feb 2000 15:34:45 -0800 Message-ID: <7781.950916885@zippy.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG C'mon, we don't need to fix this until April, why are you bringing it up now? Haha, just kidding. Ick. Yes, by all means please fix this! - Jordan > * keith@mail.telestream.com [000218 15:01] wrote: > > I'm running 3.4-Stable and have writen a realy nifty web based billing > > program for us. In testing it I've run into a odd 'date' error that is > > hosing my entire system. > > > > In portions of the script(s) I'm nabing the date as such > > DATE=`/bin/date +%G%m%d` > > All works fine there and I get what I want. > > In other parts of the script(s) I use date in a different format > > CURRENT_MONTH=`/bin/date +%m` > > This also works fine with the desired output. > > BUT,,, when I test things to make sure is all fine I step up the > > CURRENT_MONTH with this command > > CURRENT_MONTH=`/bin/date -v March +%m` > > This works fine for EVERY month except for May. When I change the > > CURRENT_MONTH to be > > CURRENT_MONTH=`/bin/date -v May +%m` It errors out big time with this. > > > > ---------- > > May: Cannot apply date adjustment > > usage: date [-nu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] > > ... > > [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format] > > ---------- > > > > Any clue as to why it would work fine on all other date adjustments with > > May being the execption? > > > > Thank you. > > er, a pretty funny ommision in vary.c, Jordan, may I apply this patch > to -current and -stable? > > I guess it broke in going from 1.1 -> 1.2 > > :) > > Index: vary.c > =================================================================== > RCS file: /home/ncvs/src/bin/date/vary.c,v > retrieving revision 1.7 > diff -u -u -r1.7 vary.c > --- vary.c 1999/08/27 23:13:59 1.7 > +++ vary.c 2000/02/19 03:25:12 > @@ -41,8 +41,8 @@ > > static struct trans trans_mon[] = { > { 1, "january" }, { 2, "february" }, { 3, "march" }, { 4, "april" }, > - { 6, "june" }, { 7, "july" }, { 8, "august" }, { 9, "september" }, > - { 10, "october" }, { 11, "november" }, { 12, "december" }, > + { 5, "may"}, { 6, "june" }, { 7, "july" }, { 8, "august" }, > + { 9, "september" }, { 10, "october" }, { 11, "november" }, { 12, "december " }, > { -1, NULL } > }; > > thanks, > -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message