Skip to content

Commit

Permalink
fix: convert error
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyc committed Oct 24, 2024
1 parent 446be3c commit 7dc4776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pisugar-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ impl PiSugarCore {
pub async fn get_ntp_datetime() -> Result<DateTime<Utc>> {
let sntp_client = AsyncSntpClient::new();
let result = sntp_client.synchronize(NTP_ADDR).await?;
Ok(result.datetime().into_chrono_datetime()?)
Ok(result.datetime().into_chrono_datetime().map_err(|e| Error::Other(format!("{}", e)))?)
}

// Fix aarch64
Expand Down

0 comments on commit 7dc4776

Please sign in to comment.