fix time and ignore duplciate scans in score keeping
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 28s

This commit is contained in:
2026-02-28 03:14:24 -05:00
parent 5b31d3079b
commit ab3a88dbc0
2 changed files with 8 additions and 4 deletions

View File

@@ -18,7 +18,13 @@
function updateTimes() {
document.querySelectorAll('time[datetime]').forEach(function (el) {
var d = new Date(el.getAttribute('datetime'));
var raw = el.getAttribute('datetime');
// SQLite stores UTC dates without a 'Z' suffix — add it so the browser
// parses them as UTC instead of local time
if (raw && !/[Z+\-]\d{0,4}$/i.test(raw)) {
raw = raw.replace(' ', 'T') + 'Z';
}
var d = new Date(raw);
if (!isNaN(d)) {
el.textContent = timeAgo(d);
el.title = d.toLocaleString();