Skip to content

Comment on British Columbia, Time Zones, and Postgresparent

Comments

These aren't global timezone changes, these are changes to individual or small batches of timezones. If you are not scheduling future events in these timezones, they do not affect you. You are welcome to overengineer systems to possibly prevent potential future timezone-shift-caused data corruption. Unless I ran a globally distributed appointment/event database, I would personally avoid doing that.

"overengineering"

    UPDATE appointments
    SET starts_at_utc = local_time AT TIME ZONE timezone_name
    WHERE timezone_name = 'America/Vancouver'
      AND starts_at_utc > now();

You elided the part where you are adding an extra column to your database just for this rare corner case.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.