GNU bug report logs - #12318
gnu date has incorrect date when using date math during a leap year

Previous Next

Package: coreutils;

Reported by: John Mizell <john.mizell <at> gmail.com>

Date: Fri, 31 Aug 2012 16:26:02 UTC

Severity: normal

Tags: notabug

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: John Mizell <john.mizell <at> gmail.com>
To: 12318 <at> debbugs.gnu.org
Subject: bug#12318: gnu date has incorrect date when using date math during a leap year
Date: Fri, 31 Aug 2012 08:39:12 -0600
gnu date has incorrect date when using date math during a leap year

Here are the steps to reproduce


[jmizell <at> backdoor ~]$ date "+%m%Y" --date='1 month ago'
072012
[jmizell <at> backdoor ~]$ date "+%m%Y" --date='5 month ago'
032012
[jmizell <at> backdoor ~]$ date "+%m%Y" --date='6 month ago'
032012
[jmizell <at> backdoor ~]$ date "+%m%Y" --date='7 month ago'
012012
[jmizell <at> backdoor ~]$ date "+%m%d%Y" --date='7 month ago'
01312012
[jmizell <at> backdoor ~]$ date "+%m%d%Y" --date='5 month ago'
03312012
[jmizell <at> backdoor ~]$ date "+%m%d%Y" --date='6 month ago'
03022012


Version:

[jmizell <at> backdoor ~]$ date --version
date (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.


Distro:
CentOS release 6.3 (Final)




This bug report was last modified 12 years and 362 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.