date: fix -d with relative dates and timezone abbreviations#10956
Conversation
|
GNU testsuite comparison: |
e3048fc to
6e75e0c
Compare
|
GNU testsuite comparison: |
|
The changes look great to me, it just has a merge conflict with the latest date changes. |
|
Darn something is quite wrong, it shows in the aggregate results that all of the GNU date tests are passing, debug should still be failing. |
6e75e0c to
3464992
Compare
|
GNU testsuite comparison: |
| @@ -1099,6 +1101,14 @@ mod tests { | |||
| assert_eq!(parse_military_timezone_with_offset("9m"), None); // Starts with digit | |||
| } | |||
|
|
|||
| #[test] | |||
| fn test_abbreviation_resolves_relative_date_against_now() { | |||
There was a problem hiding this comment.
please also add a test in tests/by-util/test_date.rs
`try_parse_with_abbreviation` resolved relative dates like "yesterday" against the system clock instead of the caller-provided reference time. Pass `now` through so both code paths use the same reference. Fixes uutils#10788
3464992 to
a50d425
Compare
Merging this PR will degrade performance by 5.25%
Performance Changes
Comparing Footnotes
|
|
Thanks! |
Fixes #10788
try_parse_with_abbreviationresolved relative dates like "yesterday" against the system clock instead of the caller-provided reference time. Passnowthrough so both code paths use the same reference.