Summary: | /bin/date broken when using 'ago' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | flobber <flobber> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED INVALID | ||
Severity: | major | CC: | f5d8fd51ed1e804c9e8d0357e8614e0493b06e96 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
flobber
2006-04-19 11:38:20 UTC
you need to do `date -d '1 hour ago 1 minute ago'` (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. 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. 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 |