Postgres Timestamp Vs Timestamptz ✦ Top
If you care when something happened, use TIMESTAMPTZ . Your future self (and your global users) will thank you. Have a horror story about timestamps gone wrong? Share it in the comments below!
If you have ever built an app that serves users across multiple time zones, you’ve likely woken up to a 3:00 AM page about "incorrect order dates" or "meetings showing up at the wrong hour." postgres timestamp vs timestamptz
-- Assume my session time zone is 'America/New_York' SET TIME ZONE 'America/New_York'; -- Create a test table CREATE TABLE time_test ( ts_native TIMESTAMP, -- without tz ts_tz TIMESTAMPTZ -- with tz ); If you care when something happened, use TIMESTAMPTZ