GNU bug report logs - #38003
date --date=-1month gives same month today

Previous Next

Package: coreutils;

Reported by: Ilja Honkonen <ilja.honkonen <at> fmi.fi>

Date: Thu, 31 Oct 2019 14:35:03 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ilja Honkonen <ilja.honkonen <at> fmi.fi>
To: bug-coreutils <at> gnu.org
Subject: date --date=-1month gives same month today
Date: Thu, 31 Oct 2019 10:34:45 +0200
Hello
Please CC me as I'm not on this list. Running date (GNU coreutils) 8.26 
on fedora 30 today (date --utc  -I: 2019-10-31) with --date=-1month gives 
the same month which doesn't make sense:
$ date --utc -I --date=-1month
2019-10-01
I assume using --date=-31day also wouldn't work if run e.g. in beginning 
of march so this looks like a bug. Same happens also without --utc and 
-I. Thanks
Ilja




This bug report was last modified 5 years and 283 days ago.

Previous Next


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