@devries-cameron20 / t3code-1 / commits / 20a70420a8
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): keep timestamp date and time in the same locale (#7081)

Co-authored-by: codex <codex@users.noreply.github.com>

Julius Marminge committed Aug 15, 2026 at 14:59 UTC 20a70420a85aecab0bde1a58921197f423e401cc
2 files changed +16 -2
apps/web/src/timestampFormat.test.ts
+14
@@ -176,6 +176,20 @@ describe("formatDayAwareTimestamp", () => {
176 );
177 });
178
179 + it("uses the host locale for both the numeric date and wall-clock time", async () => {
180 + vi.stubGlobal("window", {
181 + desktopBridge: { getSystemLocale: () => "en-GB" },
182 + });
183 + vi.resetModules();
184 +
185 + const { formatDayAwareTimestamp: formatWithHostLocale } = await import("./timestampFormat");
186 + const messageAt = iso(2026, 7, 12, 15, 44);
187 +
188 + expect(formatWithHostLocale(messageAt, "locale", now)).toBe("12/08 15:44");
189 +
190 + vi.unstubAllGlobals();
191 + });
192 +
193 it("returns an empty string for invalid input", () => {
194 expect(formatDayAwareTimestamp("not-a-date", "12-hour", now)).toBe("");
195 });
apps/web/src/timestampFormat.ts
+2 -2
@@ -127,11 +127,11 @@ export function formatShortTimestamp(isoDate: string, timestampFormat: Timestamp
127 return getTimestampFormatter(timestampFormat, false).format(date);
128 }
129
130 -const numericDateFormatter = new Intl.DateTimeFormat(undefined, {
130 +const numericDateFormatter = new Intl.DateTimeFormat(timestampLocale, {
131 month: "numeric",
132 day: "numeric",
133 });
134 -const numericDateWithYearFormatter = new Intl.DateTimeFormat(undefined, {
134 +const numericDateWithYearFormatter = new Intl.DateTimeFormat(timestampLocale, {
135 month: "numeric",
136 day: "numeric",
137 year: "numeric",