Format NOC timestamp to readable date

This commit is contained in:
2026-05-03 14:57:03 -05:00
parent d9eb653ace
commit 738dafdf63
+3 -1
View File
@@ -54,7 +54,9 @@ async function loadNocStatus() {
dot.className = "status-dot live"; dot.className = "status-dot live";
} }
if (statusText) { if (statusText) {
statusText.textContent = `${data.nocName}${data.status} — Last updated: ${data.lastUpdated}`; const d = new Date(data.lastUpdated);
const formatted = d.toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', hour: 'numeric', minute: '2-digit', hour12: true });
statusText.textContent = `${data.nocName}${data.status} — Last updated: ${formatted}`;
} }
if (badge) { if (badge) {
badge.textContent = `Auto-refresh: 30s`; badge.textContent = `Auto-refresh: 30s`;