From d524dfefd577d4d4319cffbe2c8e125c9b7700ce Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Mon, 16 Oct 2023 18:14:48 +0800 Subject: [PATCH] Replace `from_utc` with `DateTime::from_naive_utc_and_offset` DateTime::::from_utc is deprecated now. Signed-off-by: Dave Chen --- attestation-service/src/rvps/reference_value.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attestation-service/src/rvps/reference_value.rs b/attestation-service/src/rvps/reference_value.rs index ca74ae9..47f4dc0 100644 --- a/attestation-service/src/rvps/reference_value.rs +++ b/attestation-service/src/rvps/reference_value.rs @@ -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::(err.to_string()))?; - Ok(DateTime::::from_utc(ndt, Utc)) + Ok(DateTime::from_naive_utc_and_offset(ndt, Utc)) } /// Define Reference Value stored inside RVPS.