Skip to content

Commit 97b8cb8

Browse files
Copilotdorkmo
andcommitted
Remove seconds from timestamp display in Updated column
Co-authored-by: dorkmo <[email protected]>
1 parent b982cfe commit 97b8cb8

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,14 @@ static const char DASHBOARD_HTML[] PROGMEM = R"HTML(
11641164
if (!epoch) return '--';
11651165
const date = new Date(epoch * 1000);
11661166
if (isNaN(date.getTime())) return '--';
1167-
return date.toLocaleString();
1167+
return date.toLocaleString(undefined, {
1168+
year: 'numeric',
1169+
month: 'numeric',
1170+
day: 'numeric',
1171+
hour: 'numeric',
1172+
minute: '2-digit',
1173+
hour12: true
1174+
});
11681175
}
11691176
11701177
function describeCadence(seconds) {
@@ -2031,7 +2038,14 @@ static const char CLIENT_CONSOLE_HTML[] PROGMEM = R"HTML(
20312038
if (!epoch) return '--';
20322039
const date = new Date(epoch * 1000);
20332040
if (isNaN(date.getTime())) return '--';
2034-
return date.toLocaleString();
2041+
return date.toLocaleString(undefined, {
2042+
year: 'numeric',
2043+
month: 'numeric',
2044+
day: 'numeric',
2045+
hour: 'numeric',
2046+
minute: '2-digit',
2047+
hour12: true
2048+
});
20352049
}
20362050
20372051
function rowHtml(value) {

0 commit comments

Comments
 (0)