From 7d8c58ad36a3963dbdc4a280fad1d0b7dd634b24 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 1 Aug 2025 09:47:49 +0200 Subject: [PATCH 1/2] Bump parse_datetime from 0.9.0 to 0.11.0 --- Cargo.lock | 9 +++++---- Cargo.toml | 2 +- fuzz/Cargo.lock | 16 +++++++++++++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b854e8ab8..318c29ba9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1988,13 +1988,14 @@ dependencies = [ [[package]] name = "parse_datetime" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd3830b49ee3a0dcc8fdfadc68c6354c97d00101ac1cac5b2eee25d35c42066" +checksum = "c5b77d27257a460cefd73a54448e5f3fd4db224150baf6ca3e02eedf4eb2b3e9" dependencies = [ "chrono", - "nom 8.0.0", + "num-traits", "regex", + "winnow", ] [[package]] @@ -4311,7 +4312,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 49258db55..b5e01e6b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -337,7 +337,7 @@ num-prime = "0.4.4" num-traits = "0.2.19" number_prefix = "0.4" onig = { version = "~6.5.1", default-features = false } -parse_datetime = "0.9.0" +parse_datetime = "0.11.0" phf = "0.12.1" phf_codegen = "0.12.1" platform-info = "2.0.3" diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index c69adf674..474332095 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -993,13 +993,14 @@ dependencies = [ [[package]] name = "parse_datetime" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd3830b49ee3a0dcc8fdfadc68c6354c97d00101ac1cac5b2eee25d35c42066" +checksum = "c5b77d27257a460cefd73a54448e5f3fd4db224150baf6ca3e02eedf4eb2b3e9" dependencies = [ "chrono", - "nom", + "num-traits", "regex", + "winnow", ] [[package]] @@ -1981,6 +1982,15 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +[[package]] +name = "winnow" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +dependencies = [ + "memchr", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" From 7dc20bbdb0f39b2bcec1fa251fcce629637f85fb Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Fri, 1 Aug 2025 10:23:30 +0200 Subject: [PATCH 2/2] touch: adapt tests to changes in parse_datetime --- tests/by-util/test_touch.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index 70a809b95..6c2d3ff1b 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -684,7 +684,8 @@ fn test_touch_set_date_relative_smoke() { "2 seconds", "2 years 1 week", "2 days ago", - "2 months and 1 second", + "2 months 1 second", + "a", ]; for time in times { let (at, mut ucmd) = at_and_ucmd!(); @@ -694,11 +695,6 @@ fn test_touch_set_date_relative_smoke() { .no_stderr() .no_stdout(); } - let (at, mut ucmd) = at_and_ucmd!(); - at.touch("f"); - ucmd.args(&["-d", "a", "f"]) - .fails() - .stderr_contains("touch: Unable to parse date"); } #[test]