From 9305ab46460d7c6fe6b3941e1187a5d9a64151dc Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Tue, 21 May 2024 13:09:54 +1000 Subject: [PATCH] Fix use of deprecated chrono function --- lib/src/container/encapsulate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/container/encapsulate.rs b/lib/src/container/encapsulate.rs index ba6f4187..0e10d74e 100644 --- a/lib/src/container/encapsulate.rs +++ b/lib/src/container/encapsulate.rs @@ -10,7 +10,7 @@ use anyhow::{anyhow, Context, Result}; use camino::Utf8Path; use cap_std::fs::Dir; use cap_std_ext::cap_std; -use chrono::NaiveDateTime; +use chrono::DateTime; use containers_image_proxy::oci_spec; use flate2::Compression; use fn_error_context::context; @@ -169,7 +169,7 @@ fn build_oci( let commit = repo.require_rev(rev)?; let commit = commit.as_str(); let (commit_v, _) = repo.load_commit(commit)?; - let commit_timestamp = NaiveDateTime::from_timestamp_opt( + let commit_timestamp = DateTime::from_timestamp( ostree::commit_get_timestamp(&commit_v).try_into().unwrap(), 0, )