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
This commit is contained in:
parent
98981e638f
commit
2bb9582faf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163901
@ -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" */
|
||||
|
Loading…
Reference in New Issue
Block a user