diff --git a/CHANGELOG.md b/CHANGELOG.md index db79e6b..69ff007 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Notes * Deps upgrade +* Removing unnecessary `[registries.crates-io] protocol = sparse` Cargo config +* Tweaking use of `chrono` to remove use of deprecated methods # v0.3.0 (2023-06-30) diff --git a/src/utils.rs b/src/utils.rs index 33b3d28..00ccdd6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -79,11 +79,8 @@ pub(crate) fn parse_chrono_datetime_utc( ) -> Result, KonsumerOffsetsError> { let millis = parse_i64(parser)?; - Ok(chrono::DateTime::::from_utc( - chrono::NaiveDateTime::from_timestamp_millis(millis) - .ok_or(KonsumerOffsetsError::ChronoDateTimeUtcParsingError(millis))?, - chrono::Utc, - )) + chrono::DateTime::::from_timestamp_millis(millis) + .ok_or(KonsumerOffsetsError::ChronoDateTimeUtcParsingError(millis)) } /// Wraps the result of [`parse_i64`] into a [`time::OffsetDateTime`].