logoalt Hacker News

officialchicken • today at 10:07 AM • 1 reply • view on HN

SET TIME ZONE 'UTC'; // or GMT, PST, etc.


Replies

crote • today at 11:39 AM

Except you shouldn't do the GMT/PST part, because it can lead to people falsely believing that Postgres can handle time zones, leading to silent data corruption when the time zone definition changes - such as due to abolishing DST.

Postgres can only store 1) unzoned local time, or 2) UTC, with optional conversion on read/write.