From 1f584a39435feb52f8a28f3170dd9db8ea905c2c Mon Sep 17 00:00:00 2001 From: sourceturner <126549-sourceturner@users.noreply.gitlab.redox-os.org> Date: Sun, 19 Apr 2026 21:54:41 +0200 Subject: [PATCH] replace deprecated NaiveDateTime::from_timestamp --- src/header/time/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/header/time/mod.rs b/src/header/time/mod.rs index 5260095f25..1a432bf304 100644 --- a/src/header/time/mod.rs +++ b/src/header/time/mod.rs @@ -769,7 +769,9 @@ fn time_zone() -> Tz { fn now() -> NaiveDateTime { let mut now = timespec::default(); if Sys::clock_gettime(CLOCK_REALTIME, Out::from_mut(&mut now)).is_ok() {}; // TODO what to do if Err? - NaiveDateTime::from_timestamp(now.tv_sec, now.tv_nsec as _) + DateTime::from_timestamp(now.tv_sec, now.tv_nsec as _) + .unwrap_or_default() + .naive_local() } #[inline(always)]