Postgres Timestamp Vs Timestamptz 🎯 Trusted Source

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 your column is TIMESTAMPTZ , but your application sends a naive timestamp, PostgreSQL will assume the timestamp is in your session's time zone. If your server is in UTC and your user is in Sydney – . postgres timestamp vs timestamptz

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." If you care when something happened, use TIMESTAMPTZ

If you change your session time zone to 'Asia/Tokyo' (UTC+9) and read the table: If you care when something happened