From 7c0fb6a0d8463cf398ad48460e61d629a1679feb Mon Sep 17 00:00:00 2001 From: gnezim Date: Sat, 18 Apr 2026 21:16:21 +0300 Subject: [PATCH] Format UTC offset as 'UTC +HH:MM' with non-breaking space (Angular parity) Angular's captioned-time-group renders 'UTC {{ utc }}', producing 'UTC +03:00' on screen. React was emitting 'UTC+03:00' without the separator, making the time details read slightly differently. Insert a U+00A0 non-breaking space between 'UTC' and the signed offset so the time-table values ('15:30 UTC +03:00 18.04.2026') line up with Angular. --- src/shared/utils/datetime/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/utils/datetime/index.ts b/src/shared/utils/datetime/index.ts index f5ed3cde..b61e6d43 100644 --- a/src/shared/utils/datetime/index.ts +++ b/src/shared/utils/datetime/index.ts @@ -95,9 +95,11 @@ export function formatUtcOffset(iso: string): string { const m = ISO_OFFSET_RE.exec(iso); const off = m?.[6]; if (!off) return ""; - if (off === "Z") return "UTC+00:00"; + // Angular's captioned-time-group renders 'UTC {{ utc }}' — keep the + // non-breaking space so '15:30 UTC +03:00' reads the same across pages. + if (off === "Z") return "UTC\u00A0+00:00"; const normalized = off.includes(":") ? off : `${off.slice(0, 3)}:${off.slice(3)}`; - return `UTC${normalized}`; + return `UTC\u00A0${normalized}`; } /**