Bug 183937

Summary: date -d "month year" produces a strange result
Product: [Fedora] Fedora Reporter: Michael Young <m.a.young>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-08 09:32:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Young 2006-03-03 21:57:03 UTC
Description of problem:
I would expect date -d "July 2005" to return something like "Fri Jul  1 00:00:00
BST 2005" or complain that format is invalid. However for some unknown reason 
it actually returns "Mon Dec 26 00:00:00 GMT 2011". The error seems to be
constant number of days out.

Version-Release number of selected component (if applicable):
coreutils-5.2.1-48.1
However, it seems to have been broken for a long time - sh-utils-2.0.11-5.2 on
RHEL 2.1 has the same behaviour.

Comment 1 Michael Young 2006-03-08 09:32:48 UTC
It seems "July 2005" is actually giving the 2005th day of July this (32nd
July=1st August etc.). I have now checked this on the Fedora Core 5 beta, and
that reports an error with such date formats.