mirror of https://github.com/smithy-lang/smithy-rs
Fix chrono deprecation
This commit is contained in:
parent
daa1af18ac
commit
dc5a46fb18
|
@ -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]
|
||||
|
|
|
@ -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)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue