[Bug 111077] date(1): /bin/date -j -f "%b %Y" "Feb 2007" +%m returns 03 for Feb!!

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Oct 2 15:37:14 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=111077

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

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

--- Comment #2 from Pedro F. Giffuni <pfg at 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.


More information about the freebsd-bugs mailing list