bug-coreutils
[Top][All Lists]
Advanced

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

Re: [date 5.2.1] Bug in "next" statement?


From: James Youngman
Subject: Re: [date 5.2.1] Bug in "next" statement?
Date: Fri, 6 Apr 2007 16:12:14 +0100

On 4/6/07, Michel Roig <address@hidden> wrote:
Hello,

On a RHEL4 box, I tried the following commands:

 date --date="2007-03-08 10:01 1 minute ago" +"%Y-%m-%d %H:%M"
 date --date="2007-03-08 10:01 next 1 minute" +"%Y-%m-%d %H:%M"

The first command returns 2007-03-08 10:00 (which is the output I expected)
However, the second command returns 2001-03-08 10:02 (instead of 2007!)


orbital:~$ date --date="2007-03-08 10:01 1 minute ago"
Thu Mar  8 10:00:00 GMT 2007
orbital:~$ date --date="2007-03-08 10:01 1 minute"
Thu Mar  8 10:02:00 GMT 2007
orbital:~$ date --date="2007-03-08 10:01 next 1 minute"
date: invalid date `2007-03-08 10:01 next 1 minute'
orbital:~$ date --version
date (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.




reply via email to

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