From 2bca0f99020e63a910cb0392a35e3f8853dba974 Mon Sep 17 00:00:00 2001 From: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:48:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20fix:=20use=20regional=20locale?= =?UTF-8?q?=20for=20build=20date=20display?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace hardcoded US date format (MM/DD/YYYY) with toLocaleDateString() to respect the user's regional settings. The formatUSDate function now uses formatLocalDate which automatically adapts to the user's locale. _Generated with `mux`_ --- src/browser/components/TitleBar.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/browser/components/TitleBar.tsx b/src/browser/components/TitleBar.tsx index 5b829ccd67..b8259dafc8 100644 --- a/src/browser/components/TitleBar.tsx +++ b/src/browser/components/TitleBar.tsx @@ -34,12 +34,13 @@ function hasBuildInfo(value: unknown): value is VersionMetadata { return typeof candidate.buildTime === "string"; } -function formatUSDate(isoDate: string): string { +function formatLocalDate(isoDate: string): string { const date = new Date(isoDate); - const month = String(date.getUTCMonth() + 1).padStart(2, "0"); - const day = String(date.getUTCDate()).padStart(2, "0"); - const year = date.getUTCFullYear(); - return `${month}/${day}/${year}`; + return date.toLocaleDateString(undefined, { + year: "numeric", + month: "2-digit", + day: "2-digit", + }); } function formatExtendedTimestamp(isoDate: string): string { @@ -61,7 +62,7 @@ function parseBuildInfo(version: unknown) { const gitDescribe = typeof git_describe === "string" ? git_describe : undefined; return { - buildDate: formatUSDate(buildTime), + buildDate: formatLocalDate(buildTime), extendedTimestamp: formatExtendedTimestamp(buildTime), gitDescribe, };