bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date --date "4:59:54 1 hour 53 min 46 sec ago"


From: Eric Blake
Subject: Re: date --date "4:59:54 1 hour 53 min 46 sec ago"
Date: Wed, 28 Jan 2009 20:59:26 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bauke Jan Douma <bjdouma <at> xs4all.nl> writes:

> >   ~ $ date --date "4:59:54 1 hour 53 min 46 sec ago"
> >   Wed Jan 28 06:52:08 CST 2009
> 
> Seems like the 1 hour is added, the 53 minutes is added, and
> then the 46 seconds is ... subtracted.

In other words, at some point between coreutils 5.2.1 and 6.10, the parse 
provided by getdate.y changed from:

(4:59:54) + ((1 hour 53 min 46 sec) ago)

to

(4:59:54) + (1 hour 53 min) + ((46 sec) ago)

where ago negates its argument.

I've verified that the parse is unchanged between 6.10 and now (7.0+).
It's got to be one of these gnulib patches:
git log 30ffdfc..81e61b -- lib/getdate.y

although several of them touch relative computations, so it wasn't obvious from 
just the ChangeLog messages.

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]