diff --git a/Cargo.lock b/Cargo.lock index 053d91bdb3..f8677f3040 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -963,9 +963,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", diff --git a/nexus/db-queries/src/db/collection_insert.rs b/nexus/db-queries/src/db/collection_insert.rs index ef2a4a4d48..69906e6498 100644 --- a/nexus/db-queries/src/db/collection_insert.rs +++ b/nexus/db-queries/src/db/collection_insert.rs @@ -409,7 +409,7 @@ mod test { use async_bb8_diesel::{ AsyncRunQueryDsl, AsyncSimpleConnection, ConnectionManager, }; - use chrono::{NaiveDateTime, TimeZone, Utc}; + use chrono::{DateTime, Utc}; use db_macros::Resource; use diesel::expression_methods::ExpressionMethods; use diesel::pg::Pg; @@ -498,12 +498,8 @@ mod test { let resource_id = uuid::Uuid::parse_str("223cb7f7-0d3a-4a4e-a5e1-ad38ecb785d8") .unwrap(); - let create_time = Utc.from_utc_datetime( - &NaiveDateTime::from_timestamp_opt(0, 0).unwrap(), - ); - let modify_time = Utc.from_utc_datetime( - &NaiveDateTime::from_timestamp_opt(1, 0).unwrap(), - ); + let create_time = DateTime::from_timestamp(0, 0).unwrap(); + let modify_time = DateTime::from_timestamp(1, 0).unwrap(); let insert = Collection::insert_resource( collection_id, diesel::insert_into(resource::table).values(vec![( @@ -615,12 +611,8 @@ mod test { .await .unwrap(); - let create_time = Utc.from_utc_datetime( - &NaiveDateTime::from_timestamp_opt(0, 0).unwrap(), - ); - let modify_time = Utc.from_utc_datetime( - &NaiveDateTime::from_timestamp_opt(1, 0).unwrap(), - ); + let create_time = DateTime::from_timestamp(0, 0).unwrap(); + let modify_time = DateTime::from_timestamp(1, 0).unwrap(); let resource = Collection::insert_resource( collection_id, diesel::insert_into(resource::table).values(vec![( diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 218b4ac1e1..67a9a8af00 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -27,7 +27,7 @@ bstr-6f8ce4dd05d13bba = { package = "bstr", version = "0.2.17" } bstr-dff4ba8e3ae991db = { package = "bstr", version = "1.9.0" } byteorder = { version = "1.5.0" } bytes = { version = "1.6.0", features = ["serde"] } -chrono = { version = "0.4.34", features = ["serde"] } +chrono = { version = "0.4.37", features = ["serde"] } cipher = { version = "0.4.4", default-features = false, features = ["block-padding", "zeroize"] } clap = { version = "4.5.1", features = ["cargo", "derive", "env", "wrap_help"] } clap_builder = { version = "4.5.1", default-features = false, features = ["cargo", "color", "env", "std", "suggestions", "usage", "wrap_help"] } @@ -135,7 +135,7 @@ bstr-6f8ce4dd05d13bba = { package = "bstr", version = "0.2.17" } bstr-dff4ba8e3ae991db = { package = "bstr", version = "1.9.0" } byteorder = { version = "1.5.0" } bytes = { version = "1.6.0", features = ["serde"] } -chrono = { version = "0.4.34", features = ["serde"] } +chrono = { version = "0.4.37", features = ["serde"] } cipher = { version = "0.4.4", default-features = false, features = ["block-padding", "zeroize"] } clap = { version = "4.5.1", features = ["cargo", "derive", "env", "wrap_help"] } clap_builder = { version = "4.5.1", default-features = false, features = ["cargo", "color", "env", "std", "suggestions", "usage", "wrap_help"] }