Skip to content

Commit

Permalink
Update object_store chrono deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Sep 7, 2023
1 parent 65edbb1 commit 55ba0a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions object_store/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ where
D: serde::Deserializer<'de>,
{
let s: String = serde::Deserialize::deserialize(deserializer)?;
chrono::TimeZone::datetime_from_str(&chrono::Utc, &s, RFC1123_FMT)
.map_err(serde::de::Error::custom)
let naive = chrono::NaiveDateTime::parse_from_str(&s, RFC1123_FMT)
.map_err(serde::de::Error::custom)?;
Ok(chrono::TimeZone::from_utc_datetime(&chrono::Utc, &naive))
}

#[cfg(any(feature = "aws", feature = "azure"))]
Expand Down

0 comments on commit 55ba0a2

Please sign in to comment.