Skip to content

Commit

Permalink
Fix deprecation compile warning (#1154)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
  • Loading branch information
Patrik-Stas committed Mar 17, 2024
1 parent f16be59 commit 232350f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions did_core/did_methods/did_resolver_sov/src/resolution/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use chrono::{DateTime, NaiveDateTime, Utc};
use chrono::{DateTime, Utc};
use did_resolver::{
did_doc::schema::{
did_doc::DidDocument,
Expand Down Expand Up @@ -50,8 +50,7 @@ fn get_txn_time_from_response(resp: &str) -> Result<i64, DidSovError> {
}

fn unix_to_datetime(posix_timestamp: i64) -> Option<DateTime<Utc>> {
NaiveDateTime::from_timestamp_opt(posix_timestamp, 0)
.map(|date_time| DateTime::<Utc>::from_naive_utc_and_offset(date_time, Utc))
DateTime::from_timestamp(posix_timestamp, 0)
}

pub(super) fn is_valid_sovrin_did_id(id: &str) -> bool {
Expand Down

0 comments on commit 232350f

Please sign in to comment.