Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
Remove UTC suffix from formatDateShort labels (#2305)
Maximilian Kaske827f5f054574
diff --git a/apps/status-page/src/components/i18n/status-blocks-provider.tsx b/apps/status-page/src/components/i18n/status-blocks-provider.tsxindex 9b3700949..b1678e225 100644--- a/apps/status-page/src/components/i18n/status-blocks-provider.tsx+++ b/apps/status-page/src/components/i18n/status-blocks-provider.tsx@@ -117,8 +117,7 @@ export function StatusBlocksProvider({t("across {duration}", { duration }),formatDate: (d: Date) => withUTC(formatDate(d, { locale })),- formatDateShort: (d: Date) =>- withUTC(formatDate(d, { month: "short", locale })),+ formatDateShort: (d: Date) => formatDate(d, { month: "short", locale }),formatDateTime: (d: Date) => withUTC(formatDateTime(d, locale)),formatDateRange: (from?: Date, to?: Date) => {const range = formatDateRange(from, to, locale);diff --git a/apps/status-page/src/lib/status-blocks-labels.test.ts b/apps/status-page/src/lib/status-blocks-labels.test.tsindex dfb222d85..e3d5c2238 100644--- a/apps/status-page/src/lib/status-blocks-labels.test.ts+++ b/apps/status-page/src/lib/status-blocks-labels.test.ts@@ -11,8 +11,8 @@ describe("defaultStatusBlocksLabels UTC suffix", () => {expect(labels.formatDate(date)).toBe("January 15, 2024 (UTC)");});- test("formatDateShort appends the UTC suffix", () => {- expect(labels.formatDateShort(date)).toBe("Jan 15, 2024 (UTC)");+ test("formatDateShort omits the UTC suffix (date-only label)", () => {+ expect(labels.formatDateShort(date)).toBe("Jan 15, 2024");});test("formatDateTime appends the UTC suffix", () => {diff --git a/packages/ui/src/components/blocks/status-timestamp.tsx b/packages/ui/src/components/blocks/status-timestamp.tsxindex f5939190a..1f9e5338a 100644--- a/packages/ui/src/components/blocks/status-timestamp.tsx+++ b/packages/ui/src/components/blocks/status-timestamp.tsx@@ -190,7 +190,7 @@ function SimpleTimestamp({)}{...props}>- {children || format(new UTCDate(date), "LLL dd, y HH:mm (z)")}+ {children || format(new UTCDate(date), "LLL dd, y HH:mm '(UTC)'")}</TooltipTrigger><TooltipContent data-slot="status-timestamp-content"><p className="font-mono">{format(date, "LLL dd, y HH:mm (z)")}</p>diff --git a/packages/ui/src/components/blocks/status.utils.ts b/packages/ui/src/components/blocks/status.utils.tsindex 71b5de222..ee7839e20 100644--- a/packages/ui/src/components/blocks/status.utils.ts+++ b/packages/ui/src/components/blocks/status.utils.ts@@ -347,7 +347,7 @@ export const defaultStatusBlocksLabels = {durationAcross: (s: string) => `across ${s}`,formatDate: (d: Date) => withUTC(formatDate(d)),- formatDateShort: (d: Date) => withUTC(formatDateShort(d)),+ formatDateShort: (d: Date) => formatDateShort(d),formatDateTime: (d: Date) => withUTC(formatDateTime(d)),formatDateRange: (from?: Date, to?: Date) => {const range = formatDateRange(from, to);