GNU bug report logs -
#48085
date -d greater than 23 years ago gives error invalid date
Previous Next
Reported by: Mark Krenz <mark <at> slugbug.org>
Date: Wed, 28 Apr 2021 20:31:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 48085 <at> debbugs.gnu.org (full text, mbox):
Well it seems that this might actually be related to timezone database
files. My timezone is America/Indianapolis but I noticed when I set the
timezone to America/New_York or UTC that this problem doesn't happen
$ TZ=America/Indianapolis date -d "now - 9001 days"
date: invalid date ‘now - 9001 days’
$ TZ=America/New_York date -d "now - 9001 days"
Thu 05 Sep 1996 07:05:55 PM EDT
$ TZ=UTC date -d "now - 9001 days"
Thu 05 Sep 1996 11:05:59 PM UTC
$ TZ=America/Metlakatla date -d "now - 9001 days"
date: invalid date ‘now - 9001 days’
$
I found that last one after trying a for loop in /usr/share/zoneinfo/America
So I'm not sure if this is a problem with coreutils or a change in the
zoneinfo database. Any ideas?
Mark
This bug report was last modified 187 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.