diff options
author | kientzle <kientzle@FreeBSD.org> | 2006-11-02 04:16:15 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2006-11-02 04:16:15 +0000 |
commit | 2f99905b1f22b5828bb69b6648f5fa03ed8415e3 (patch) | |
tree | 251dbc2361b2bb0d8612294ddee81eedd5b24141 /usr.bin/tar | |
parent | 158b60fc3be29ad3675daeb90fdae7de76b92272 (diff) | |
download | FreeBSD-src-2f99905b1f22b5828bb69b6648f5fa03ed8415e3.zip FreeBSD-src-2f99905b1f22b5828bb69b6648f5fa03ed8415e3.tar.gz |
Fix "1 day ago", "yesterday" and similar relative-time phrases
when parsing dates.
PR: bin/104934: bug in some date handling of bsdtar
Reported by: Herve Boulouis
MFC after: 3 days
Diffstat (limited to 'usr.bin/tar')
-rw-r--r-- | usr.bin/tar/getdate.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tar/getdate.y b/usr.bin/tar/getdate.y index b40058c..c18e2d3 100644 --- a/usr.bin/tar/getdate.y +++ b/usr.bin/tar/getdate.y @@ -270,11 +270,11 @@ relunit : '-' tUNUMBER tSEC_UNIT { } | tUNUMBER tSEC_UNIT { /* "1 day" */ - yyRelSeconds += $1; + yyRelSeconds += $1 * $2; } | tSEC_UNIT { /* "hour" */ - yyRelSeconds++; + yyRelSeconds += $1; } | '-' tUNUMBER tMONTH_UNIT { /* "-3 months" */ |