GNU bug report logs - #6897
date -d '1991-04-14 +1 day' fails

Previous Next

Package: coreutils;

Reported by: 李嘉鹏 <lijpbasin <at> 126.com>

Date: Sun, 22 Aug 2010 19:33:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Paul Eggert <eggert <at> CS.UCLA.EDU>
To: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
Cc: "6897 <at> debbugs.gnu.org" <6897 <at> debbugs.gnu.org>,
	Alan Curry <pacman-cu <at> kosh.dhis.org>,
	李嘉鹏 <lijpbasin <at> 126.com>
Subject: Re: bug#6897: date -d '1991-04-14 +1 day' fails
Date: Tue, 24 Aug 2010 01:03:56 -0700
On 08/24/10 00:23, Voelker, Bernhard wrote:

> BTW: This example looks different here:
> 
>   $ TZ=Pacific/Kwajalein date -d 1993-08-20
>   Sat Aug 21 00:00:00 MHT 1993
> 
>   $ date --version
>   date (GNU coreutils) 8.5
>   Packaged by Cygwin (8.5-2)
>   ...
> 
> Why?

Haven't a clue.  Perhaps you can debug it?  I get the
correct answer (i.e., there was no such date) on both
RHEL 5 with my own-built coreutils 8.5, and with
Ubuntu 10.04 with its standard-issue coreutils 7.4.

> With a normal user's perspective, I'd expect `date` to "just do the job"

Gee, I don't know, all the normal users I know
just want "date" to print the date.

Date arithmetic is pretty esoteric, after all.
What is one month after 31 January, for example?
There's no way this stuff can be done in a way
that is straightforward and satisfies everybody.
I'm becoming more inclined to say that GNU date
shouldn't be doing date arithmetic at all.




This bug report was last modified 14 years and 275 days ago.

Previous Next


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