Red Hat Bugzilla – Bug 183937
date -d "month year" produces a strange result
Last modified: 2008-05-01 11:38:06 EDT
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):
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.
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.