bugGNU Core Utilities - Bugs: bug #11687, GNU date doesn't discriminate...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11687: GNU date doesn't discriminate between + and - in relative dates.

Submitted by:  Ingvar Mattsson <ingvar>
Submitted on:  Fri 21 Jan 2005 07:22:35 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 21 Jan 2005 11:43:13 PM UTC, comment #1:

The sign bug appears to be fixed in coreutils 5.3.0:

$ date; date -d "1715 - 15 minutes"; date -d "1715 + 15 minutes"; date -d "1715 + 15 minutes ago"; date -d "1715 - 15 minutes ago"; date -d "- 1 month"; date; date --version
Fri Jan 21 15:33:47 PST 2005
date: invalid date `1715 - 15 minutes'
date: invalid date `1715 + 15 minutes'
date: invalid date `1715 + 15 minutes ago'
date: invalid date `1715 - 15 minutes ago'
Tue Dec 21 15:33:47 PST 2004
Fri Jan 21 15:33:47 PST 2005
date (GNU coreutils) 5.3.0
Written by David MacKenzie.

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

As you can see, a few other parsing details have changed,
due to the ambiguity between time zone indications and
the offset notation; but at least `date -d "- 1 month"'
works.

Paul Eggert <eggert>
Project Administrator
Fri 21 Jan 2005 07:22:35 PM UTC, original submission:

GNU date doesn't discriminate between + and - in relative dates. This may well affect all GNU coreutils using the same date parsing library.

Example:
head$ date --version
date (coreutils) 5.2.1
Written by David MacKenzie.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
head$ date
Fri Jan 7 07:10:43 GMT 2005
head$ date -d "1715 - 15 minutes"
Fri Jan 7 17:30:00 GMT 2005
head$ date -d "1715 + 15 minutes"
Fri Jan 7 17:30:00 GMT 2005
head$ date -d "1715 + 15 minutes ago"
Fri Jan 7 17:00:00 GMT 2005
head$ date -d "1715 - 15 minutes ago"
Fri Jan 7 17:00:00 GMT 2005
head$ date -d "- 1 month"
Mon Feb 7 07:10:36 GMT 2005

[ NB, this bug was delayed, due to a submission to the Debian bug tracking system,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=289103
]

Ingvar Mattsson <ingvar>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 21 Jan 2005 11:43:47 PM UTCeggertStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1