Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Replace from_utc with DateTime::from_naive_utc_and_offset
Browse files Browse the repository at this point in the history
DateTime::<Tz>::from_utc is deprecated now.

Signed-off-by: Dave Chen <[email protected]>
  • Loading branch information
chendave authored and Xynnn007 committed Oct 26, 2023
1 parent 1ed4e2d commit e050dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attestation-service/src/rvps/reference_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fn primitive_date_time_from_str<'de, D: Deserializer<'de>>(
let ndt = NaiveDateTime::parse_from_str(s, "%Y-%m-%dT%H:%M:%SZ")
.map_err(|err| serde::de::Error::custom::<String>(err.to_string()))?;

Ok(DateTime::<Utc>::from_utc(ndt, Utc))
Ok(DateTime::from_naive_utc_and_offset(ndt, Utc))
}

/// Define Reference Value stored inside RVPS.
Expand Down

0 comments on commit e050dd8

Please sign in to comment.