From dc505e905ec256f034a963f12752dcc4187cb7b9 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Thu, 14 Sep 2023 13:17:38 -0600 Subject: [PATCH] chore(cli): update chrono to remove broken time dep (#20508) Fixes the last dependabot security warning --- Cargo.lock | 32 +++++++------------------------- Cargo.toml | 2 +- cli/util/time.rs | 2 +- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7c7a12407f..60897e5041 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,7 +215,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] @@ -533,18 +533,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -5514,17 +5513,6 @@ dependencies = [ "syn 2.0.33", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.28" @@ -5799,7 +5787,7 @@ dependencies = [ "radix_trie", "rand", "thiserror", - "time 0.3.28", + "time", "tokio", "tracing", "trust-dns-proto", @@ -5866,7 +5854,7 @@ dependencies = [ "futures-util", "serde", "thiserror", - "time 0.3.28", + "time", "tokio", "toml", "tracing", @@ -6144,12 +6132,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -6439,7 +6421,7 @@ dependencies = [ "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.28", + "time", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index b3556c274d..5ca7d1d961 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -82,7 +82,7 @@ brotli = "3.3.4" bytes = "1.4.0" cache_control = "=0.2.0" cbc = { version = "=0.1.2", features = ["alloc"] } -chrono = { version = "=0.4.26", default-features = false, features = ["std", "serde", "clock"] } +chrono = { version = "0.4", default-features = false, features = ["std", "serde", "clock"] } console_static_text = "=0.8.1" data-url = "=0.3.0" dlopen = "0.1.8" diff --git a/cli/util/time.rs b/cli/util/time.rs index 5c1a89d487..0107d8416d 100644 --- a/cli/util/time.rs +++ b/cli/util/time.rs @@ -19,5 +19,5 @@ pub fn utc_now() -> chrono::DateTime { now.subsec_nanos(), ) .unwrap(); - chrono::DateTime::from_utc(naive, chrono::Utc) + chrono::DateTime::from_naive_utc_and_offset(naive, chrono::Utc) }