Postgres Timestamp Vs Timestamptz Fixed May 2026

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!

Always use in your application code. Quick Decision Flowchart Is this a single, absolute moment in time? │ ├── YES (e.g., created_at, updated_at, event start time for global users) │ → Use TIMESTAMPTZ │ └── NO (e.g., "Every day at 9 AM" recurring alarm) → Use TIMESTAMP + store time zone separately in another column Pro Tip: TIMESTAMPTZ Does NOT Store the Time Zone This is the #1 misunderstanding. TIMESTAMPTZ does not save 'America/Chicago' or '+05:30' . It converts your input to UTC, stores UTC, and discards the original offset. postgres timestamp vs timestamptz

Chances are, you chose the wrong PostgreSQL temporal data type. If you care when something happened, use TIMESTAMPTZ

To preserve the user's original time zone (e.g., for compliance or display), you need a : Share it in the comments below

# Django/ORM example from django.utils import timezone import datetime bad_time = datetime.datetime(2025, 4, 14, 14, 0, 0) GOOD: Aware datetime good_time = timezone.now() # includes UTC offset

Find us on Facebook