Bug 183937 - date -d "month year" produces a strange result
Summary: date -d "month year" produces a strange result
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-03 21:57 UTC by Michael Young
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-08 09:32:48 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.