Make the wall display and Proxmox dates follow the date and time settings

The wall clock, date line and 'Updated' footer used the browser locale, and the
Proxmox backup tasks and PBS page used toLocaleString. They now use the display
settings via new formatDate/formatTime helpers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-16 21:02:41 +02:00
1 parent bff0c2169e
commit 3945c60681
4 files changed
+23 -21

No files matched your search

+4 -3
View File
@@ -4,6 +4,7 @@ import { api, type IntegrationSummary, type MaintenanceWindow, type ServerSummar
import { alertBadge, useAlertsReport } from "../hooks/useAlertsReport";
import { useEnvironment } from "../utils/environment";
import { formatRemaining } from "../utils/duration";
import { formatDate, formatTime } from "../utils/date";
const REFRESH_MS = 30_000;
@@ -133,8 +134,8 @@ export default function Wall() {
<img src="/logo.webp" alt="Homelab Manager" width={901} height={460} className="wall-logo" />
{environment?.name && <span className="badge env-badge">{environment.name}</span>}
<div className="wall-clock" aria-label="Time">
<div className="wall-time">{now.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })}</div>
<div className="wall-date">{now.toLocaleDateString([], { weekday: "long", day: "numeric", month: "long" })}</div>
<div className="wall-time">{formatTime(now, false)}</div>
<div className="wall-date">{now.toLocaleDateString([], { weekday: "long" })} {formatDate(now)}</div>
</div>
</header>
@@ -223,7 +224,7 @@ export default function Wall() {
<footer className="wall-footer">
<span>
{updatedAt ? `Updated ${updatedAt.toLocaleTimeString()}` : "Loading…"} · refreshes every {REFRESH_MS / 1000} s
{updatedAt ? `Updated ${formatTime(updatedAt)}` : "Loading…"} · refreshes every {REFRESH_MS / 1000} s
</span>
<span className="wall-footer-actions">
<button type="button" className="wall-link" onClick={() => void document.documentElement.requestFullscreen?.().catch(() => {})}>