GNU bug report logs - #68064
Date addition error with “day Monthname” versus “Monthname day”

Previous Next

Package: coreutils;

Reported by: Larry Ploetz <lploetz <at> gmail.com>

Date: Wed, 27 Dec 2023 17:30:02 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Larry Ploetz <lploetz <at> gmail.com>
To: 68064 <at> debbugs.gnu.org
Subject: bug#68064: Date addition error with “day Monthname” versus “Monthname day”
Date: Wed, 27 Dec 2023 11:29:00 -0600
[Message part 1 (text/plain, inline)]
It seems like there might be a problem with date addition when the base 
date is specified as “day Monthname” instead of “Monthname day”, where 
the offset is being interpreted as an absolute year value. This may be 
locale-specific.

   <hostname>:bin larry$ locale
   LANG="en_US.UTF-8"
   LC_COLLATE="en_US.UTF-8"
   LC_CTYPE="en_US.UTF-8"
   LC_MESSAGES="en_US.UTF-8"
   LC_MONETARY="en_US.UTF-8"
   LC_NUMERIC="en_US.UTF-8"
   LC_TIME="en_US.UTF-8"
   LC_ALL=
   <hostname>:bin larry$ ./date -d "$(./date -d today +%d\ %b) + 1 day"
   Fri Dec 28 00:00:00 LMT 0001
   <hostname>:bin larry$ ./date -d "$(./date -d today +%b\ %d) + 1 day"
   Thu Dec 28 00:00:00 CST 2023
   <hostname>:bin larry$ ./date --version
   date (GNU coreutils) 9.4.97-98d463
   Copyright (C) 2023 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later<https://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.

Thanks,
·Larry


[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 203 days ago.

Previous Next


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