bin/118330: /bin/date thinks December has 30 days

Michael Wayne wayne at
Thu Nov 29 10:10:01 PST 2007

>Number:         118330
>Category:       bin
>Synopsis:       /bin/date thinks December has 30 days
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 29 18:10:00 UTC 2007
>Originator:     Michael Wayne
>Release:        6.2-RELEASE-p3
Msen, Inc.
FreeBSD 6.2-RELEASE-p3 FreeBSD 6.2-RELEASE-p3 #1: Fri Mar 23 10:44:55 EDT 2007     root at  i386
/bin/date does not believe that December has 31 days
December 30 works:
% date -v30d -v12m -v7y
Sun Dec 30 13:04:56 EST 2007

Dec 31 does not:
% date -v31d -v12m -v7y  
31d: Cannot apply date adjustment
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
A quick glance at the code shows that the constant table lists 31 days for December so it's going to take a bit more effort than that.


More information about the freebsd-bugs mailing list