From 623d2a12cce3a460a3199595347f17d51f15ef28 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Tue, 23 Jun 2026 22:39:21 +0200 Subject: [PATCH] fix(ui): handle +00:00 timezone in formatTimestamp --- crates/archivr-server/static/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/archivr-server/static/app.js b/crates/archivr-server/static/app.js index afd02a9..ea6c3d2 100644 --- a/crates/archivr-server/static/app.js +++ b/crates/archivr-server/static/app.js @@ -67,8 +67,7 @@ function sourceIcon(kind) { function formatTimestamp(value) { if (!value) return ""; - // value is an ISO-8601 string from SQLite; display as "YYYY-MM-DD HH:MM" - const d = new Date(value.endsWith("Z") ? value : value + "Z"); + const d = new Date(value); if (isNaN(d)) return value; const pad = (n) => String(n).padStart(2, "0"); return `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())} ${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}`;