mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
The H24 / H12 preference only reached makeFormatters().time. Surfaces that build their own Intl.DateTimeFormat — the sleep hypnogram axis, the workout list and detail headers — omitted the hour cycle, so an en-locale (or AUTO) user saw AM/PM even with H24 selected. The security activity feed and session list rendered raw toLocaleString(), bypassing both the locale and the preference entirely. Export hourCycleOptions from format-locale as the single source for the H12 / H24 / AUTO Intl options and spread it into the self-built formatters, preserving each surface's locale and timezone. Route the security cards through useFormatters().dateTime. Drop the date-time field's local copy of the helper. Guards: the helper contract, the en-US hour/minute call-site pattern (no AM/PM under H24, AM/PM under H12), and formatUpdatedLabel fed an H24 formatter for the briefing freshness label.