Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130503 - /bin/date broken when using 'ago'
Summary: /bin/date broken when using 'ago'
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-19 11:38 UTC by flobber
Modified: 2006-04-20 06:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flobber 2006-04-19 11:38:20 UTC
The command

  date -d '1 hour ago'

works, but

  date - d '1 hour 1 minutes ago'

does not, the "ago" is ignored.

Earlier versions of date didn't have this bug.

Broken version:
  date (GNU coreutils) 5.94
Comment 1 SpanKY gentoo-dev 2006-04-19 11:53:52 UTC
you need to do `date -d '1 hour ago 1 minute ago'`
Comment 2 flobber 2006-04-19 12:17:46 UTC
(In reply to comment #1)
> you need to do `date -d '1 hour ago 1 minute ago'`

For at least the last 10 years '1 hour 1 minute ago' was
taken as -61 minutes not +59 minutes.  I have a couple of
scripts that broke due to this BUG.
Comment 3 flobber 2006-04-19 12:31:40 UTC
Just for the record, the oldest GNU date I have available is 1.16
from 1997 and it takes it as -61 minutes as does 5.3.0 from 2005.

And the notation of '1 hour ago 1 minute ago' is interpreted
by those versions as '(((1 hour) ago) 1 minute) ago' giving
+59 minutes.  So this syntax is not even backwards compatible.
Comment 4 SpanKY gentoo-dev 2006-04-20 06:02:52 UTC
the documentation suggests the new behavior is correct (confirmed with upstream)

if you still feel this is a bug, talk with upstream
http://lists.gnu.org/mailman/listinfo/bug-coreutils