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 committed Oct 16, 2023
1 parent 6a01912 commit c5b339b
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 c5b339b

Please sign in to comment.