Skip to content

.tip

· one of the small things

Store the time zone name, not the UTC offset

An offset like +03:00 is only true until the next daylight saving change, so a meeting saved as a bare instant fires an hour off six months later. For anything in the future, store the wall clock time the user picked and the IANA zone it belongs to.

starts_at_local timestamp NOT NULL,
time_zone text NOT NULL, -- 'Europe/Istanbul'
-- SELECT starts_at_local AT TIME ZONE time_zone AS starts_at

Resolve the instant when you send, not when you save. The browser gives you the zone name with Intl.DateTimeFormat().resolvedOptions().timeZone.

schema-designi18n