‹ BackHN Continuity

Thread

Footguns with Postgres “at time zone 'UTC'”

169 points · 114 comments · birdculture

  1. ForHackernews · · focus · HN ↗
    Postgres 'at time zone' is confusing, but it's internally consistent. Once you understand what it's doing, you can work with it and it will reliably behave the way it's designed to.

    <a href="https:&#x2F;&#x2F;oneuptime.com&#x2F;blog&#x2F;post&#x2F;2026-01-25-postgresql-timezone-handling&#x2F;view#converting-between-timezones" rel="nofollow">https:&#x2F;&#x2F;oneuptime.com&#x2F;blog&#x2F;post&#x2F;2026-01-25-postgresql-timezo...

        -- TIMESTAMPTZ AT TIME ZONE &#x27;X&#x27; -&gt; returns TIMESTAMP in timezone X
        -- TIMESTAMP AT TIME ZONE &#x27;X&#x27; -&gt; returns TIMESTAMPTZ treating input as timezone X
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.