Fix SSR/hydration timezone flip in event date and time display #95
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/event-schedule-timezone-display"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
useHasMountedhook (usinguseSyncExternalStore— no extra render cycle) to gate UTC timestamp formatting to client-onlyEventScheduleandUpcomingCalendarPanelwhere SSR rendered UTC time (e.g. "9:00 PM") and the client re-rendered with local time (e.g. "2:00 PM PDT") after hydration, withsuppressHydrationWarningsilently hiding the mismatchformatEventDateindate-utils.ts(andEventSchedule's private copy) to parseYYYY-MM-DDstrings as local midnight instead of UTC midnight, correcting an off-by-one day bug for UTC-negative users across all callersTest plan
UpcomingCalendarPanel— confirm same behavior