From lowell@be-well.ilk.org  Sat Dec  1 01:56:08 2012
Return-Path: <lowell@be-well.ilk.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id E079D28B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Dec 2012 01:56:08 +0000 (UTC)
	(envelope-from lowell@be-well.ilk.org)
Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243])
	by mx1.freebsd.org (Postfix) with ESMTP id ABBFC8FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  1 Dec 2012 01:56:08 +0000 (UTC)
Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.53])
	by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 5909FA703FC
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 30 Nov 2012 20:56:01 -0500 (EST)
Received: (qmail 29706 invoked from network); 1 Dec 2012 01:56:00 -0000
Received: by simscan 1.4.0 ppid: 3862, pid: 18704, t: 0.6233s
         scanners: clamav: 0.88.2/m:52/d:13495
Received: from unknown (HELO be-well.ilk.org) ([66.92.78.145])
          (envelope-sender <lowell@be-well.ilk.org>)
          by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 1 Dec 2012 01:56:00 -0000
Received: by be-well.ilk.org (Postfix, from userid 1147)
	id BBDAE33C32; Fri, 30 Nov 2012 20:55:56 -0500 (EST)
Message-Id: <20121201015556.BBDAE33C32@be-well.ilk.org>
Date: Fri, 30 Nov 2012 20:55:56 -0500 (EST)
From: Lowell Gilbert <lgfbsd@be-well.ilk.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: kientzle@freebsd.org
Subject: tar doesn't properly handle keyword "ago" in dates
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         174025
>Category:       bin
>Synopsis:       tar(1) doesn't properly handle keyword "ago" in dates
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 01 02:00:00 UTC 2012
>Closed-Date:    
>Last-Modified:  Wed Feb 13 17:24:38 UTC 2013
>Originator:     Lowell Gilbert
>Release:        FreeBSD 9.1-PRERELEASE i386
>Organization:
The Ilk
>Environment:
System: FreeBSD be-well.ilk.org 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Fri Nov 23 13:41:39 EST 2012 root@lowell-desk.lan:/usr/obj/usr/src/sys/BE-WELL i386


	
>Description:

The keyword "ago" doesn't work properly in date specifications for "--newer" et al.

A quick look at the code makes me think it might be coded for seconds and months, but nothing else.

	
>How-To-Repeat:

Try '--newer "2 hours ago"' and '--newer "-2 hours"'.
They should do the same thing, but they don't.

e.g., 
	[5020] (lowell-desk) ~> tar  -cf out.tar --newer "now - 24 hours" bin
	[5021] (lowell-desk) ~> tar  -cvf out.tar --newer "now - 2 hours" bin
	a bin
	a bin/periodicbkp
	[5022] (lowell-desk) ~> 

	
>Fix:

Offhand, it looks to me like the parsing routine phrase() needs to
adjust fields besides RelSeconds and RelMonths for the 'tAgo'
case. 

But since there is alternative syntax for the same functionality, I'd
be okay with just getting rid of "ago" completely.

	


>Release-Note:
>Audit-Trail:
>Unformatted:
