Skip to content

Comment on British Columbia, Time Zones, and Postgresparent

Comments

"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.