From owner-freebsd-bugs@FreeBSD.ORG Sat Dec 1 02:00:00 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BE0112AC for ; Sat, 1 Dec 2012 02:00:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1E48FC12 for ; Sat, 1 Dec 2012 02:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qB1200F1031396 for ; Sat, 1 Dec 2012 02:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qB12002p031395; Sat, 1 Dec 2012 02:00:00 GMT (envelope-from gnats) Resent-Date: Sat, 1 Dec 2012 02:00:00 GMT Resent-Message-Id: <201212010200.qB12002p031395@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lowell Gilbert Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E079D28B for ; 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 ; 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 ; 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 ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.114 Subject: bin/174025: tar doesn't properly handle keyword "ago" in dates Cc: kientzle@FreeBSD.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2012 02:00:00 -0000 >Number: 174025 >Category: bin >Synopsis: tar 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: >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: