Fix chrono deprecation

This commit is contained in:
Russell Cohen 2023-08-29 10:16:39 -04:00
parent daa1af18ac
commit dc5a46fb18
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ convert-time = ["aws-smithy-types", "time"]
[dependencies]
aws-smithy-types = { path = "../aws-smithy-types", optional = true }
chrono = { version = "0.4.23", optional = true, default-features = false, features = ["std"] }
chrono = { version = "0.4.26", optional = true, default-features = false, features = ["std"] }
time = { version = "0.3.4", optional = true }
[package.metadata.docs.rs]

View File

@ -136,7 +136,7 @@ impl DateTimeExt for DateTime {
self.secs(),
self.subsec_nanos()
))),
Some(dt) => Ok(chrono::DateTime::<chrono::Utc>::from_utc(dt, chrono::Utc)),
Some(dt) => Ok(chrono::TimeZone::from_utc_datetime(&chrono::Utc, &dt)),
}
}