Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Oct 2014 15:37:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 111077] date(1): /bin/date -j -f "%b %Y" "Feb 2007" +%m returns 03 for Feb!!
Message-ID:  <bug-111077-8-Lubgwoq2gF@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-111077-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-111077-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=111077

Pedro F. Giffuni <pfg@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|In Discussion               |Issue Resolved
                 CC|                            |pfg@FreeBSD.org
         Resolution|---                         |FIXED

--- Comment #2 from Pedro F. Giffuni <pfg@FreeBSD.org> ---
(In reply to paradox from comment #0)
> Date input of "mmm yyyy" for Feb always returns 03.
> 
> Flaw exists across all know bsd versions, intel, amd, 64bit, not, etc.
> 
> Fix: 
> 
> Got me :>
> How-To-Repeat: > # /bin/date -j -f "%b %Y" "Jan 2007" +%m
> > 01
> > # /bin/date -j -f "%b %Y" "Feb 2007" +%m
> > 03
> > # /bin/date -j -f "%m %Y" "02 2007" +%m
> > 03
> > # /bin/date -j -f "%m %Y" "02 2007" +%m-%b
> > 03-Mar

I cannot reproduce this on 11-current:

$ /bin/date -j -f "%b %Y" "Jan 2007" +%m
01
$ /bin/date -j -f "%b %Y" "Feb 2007" +%m
02
$ /bin/date -j -f "%m %Y" "02 2007" +%m
02
$ /bin/date -j -f "%m %Y" "02 2007" +%m-%b
02-Feb

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-111077-8-Lubgwoq2gF>