Fix time display

This commit is contained in:
2026-04-03 15:11:52 +02:00
parent d33c7a748b
commit abe805926a
2 changed files with 7 additions and 29 deletions

View File

@@ -42,16 +42,14 @@
if (!isoStr) return "";
var d = new Date(isoStr);
if (isNaN(d.getTime())) return isoStr;
return (
formatDate(isoStr) + " " + pad2(d.getHours()) + ":" + pad2(d.getMinutes())
);
return formatDate(isoStr) + " " + formatTimeOnly(isoStr);
}
function formatTimeOnly(isoStr) {
if (!isoStr) return "";
var d = new Date(isoStr);
if (isNaN(d.getTime())) return isoStr;
return pad2(d.getHours()) + ":" + pad2(d.getMinutes());
var match = isoStr.match(/T(\d{2}):(\d{2})/);
if (!match) return isoStr;
return match[1] + ":" + match[2];
}
function formatEventListTime(startIso, fallbackTime) {