fix: day grouping compares against the local date, not the UTC one

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 <noreply@anthropic.com>
This commit is contained in:
2026-07-29 20:21:17 +02:00
co-authored by Claude Opus 5
parent 46af41b12d
commit 4aa7f7253e
+5 -1
View File
@@ -772,7 +772,11 @@ function renderFiles(files) {
document.getElementById('empty').style.display = visible ? 'none' : ''; document.getElementById('empty').style.display = visible ? 'none' : '';
const days = groupByDay(files); 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) => { days.forEach((dayFiles, day) => {
const dayId = 'day-' + day.replace(/-/g, ''); const dayId = 'day-' + day.replace(/-/g, '');