From 4aa7f7253e598c06efa1d12b3bc68e3aaf7ff06b Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 29 Jul 2026 20:21:17 +0200 Subject: [PATCH] fix: day grouping compares against the local date, not the UTC one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit renderFiles() derived "today" from new Date().toISOString(), which is UTC, and compared it to f.date — the recording start in local time, parsed server-side out of the filename. In any non-UTC timezone the two disagree for part of every day, and the current day's group (the one always wanted open) renders collapsed: 00:00-02:00 local in UTC+2, most of the evening in UTC-5. Co-Authored-By: Claude Opus 5 --- webui.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webui.html b/webui.html index 9953f69..90a2e2e 100644 --- a/webui.html +++ b/webui.html @@ -772,7 +772,11 @@ function renderFiles(files) { document.getElementById('empty').style.display = visible ? 'none' : ''; const days = groupByDay(files); - const today = new Date().toISOString().slice(0, 10); + // Local date, not toISOString() — f.date is the recording start in local + // time, so a UTC "today" leaves the current day collapsed for part of every + // day in any non-UTC timezone (00:00–02:00 in UTC+2, all evening in UTC−5). + const now = new Date(); + const today = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`; days.forEach((dayFiles, day) => { const dayId = 'day-' + day.replace(/-/g, '');