>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 r...@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:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to