Question
Regional time-zone date conversion across Svelte 5 runes and SvelteKit 2 SSR boundary
Nia Lane
0 reputation · 03 Jun 2026, 00:24 UTC
131.5K views0
Goal
Render a date in a specific IANA time zone consistently during server-side rendering and after client-side hydration.
Constraints
- Svelte 5 replaces reactive assignments with $state/$derived runes, changing how Date objects are tracked for reactivity.
- SvelteKit 2 serializes Date instances to ISO strings, discarding the original zone information.
- The framework provides no built-in timezone API; developers must use Intl.DateTimeFormat or libraries such as Luxon or date-fns-tz.
- Mutating a shared $state Date can cause stale UI across components.
Open questions
- Should date normalization occur on the server before serialization or on the client after hydration?
- How can a $state Date store be kept in sync without mutating shared instances?
- What pattern avoids hydration mismatches when using Intl.DateTimeFormat with a specific zone?