Unverified Commit 1f4d2b9e authored by John DiSanti's avatar John DiSanti Committed by GitHub
Browse files

Update to remove use of deprecated method (#3468)



_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

Co-authored-by: default avatarRussell Cohen <rcoh@amazon.com>
parent fceb914f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
[package]
name = "aws-smithy-types-convert"
version = "0.60.7"
version = "0.60.8"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>"]
description = "Conversion of types from aws-smithy-types to other libraries."
edition = "2021"
@@ -15,7 +15,7 @@ convert-streams = ["aws-smithy-async", "futures-core"]
[dependencies]
aws-smithy-types = { path = "../aws-smithy-types", optional = true }
aws-smithy-async = { path = "../aws-smithy-async", optional = true }
chrono = { version = "0.4.26", optional = true, default-features = false, features = ["std"] }
chrono = { version = "0.4.35", optional = true, default-features = false, features = ["std"] }
time = { version = "0.3.4", optional = true }
futures-core = { version = "0.3.0", optional = true }

+2 −2
Original line number Diff line number Diff line
@@ -130,13 +130,13 @@ pub trait DateTimeExt {
impl DateTimeExt for DateTime {
    #[cfg(feature = "convert-chrono")]
    fn to_chrono_utc(&self) -> Result<chrono::DateTime<chrono::Utc>, Error> {
        match chrono::NaiveDateTime::from_timestamp_opt(self.secs(), self.subsec_nanos()) {
        match chrono::DateTime::from_timestamp(self.secs(), self.subsec_nanos()) {
            None => Err(Error::out_of_range(format!(
                "out-of-range seconds {} or invalid nanoseconds {}",
                self.secs(),
                self.subsec_nanos()
            ))),
            Some(dt) => Ok(chrono::TimeZone::from_utc_datetime(&chrono::Utc, &dt)),
            Some(dt) => Ok(dt),
        }
    }