Uploaded September 2024 | Updated September 2026, 7 hours ago
Want to learn more Postgres? Check out my Postgres course: https://masteringpostgres.com.
Production ready Postgres for teams that ship fast: xata.io
In this video, I'll show you how to keep your sanity by using best practices (aka the least frustrating way) to handle timezones in PostgreSQL!
Follow me:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: aaronfrancis.com - find articles, podcasts, courses, and more.
Chapters:
00:00 - Introduction to Time Zones in PostgreSQL
00:51 - Why Time Zones Are Frustrating
01:42 - Best Practices for Handling Time Zones
02:24 - Using UTC for Consistency
03:04 - Setting the Time Zone for Your Database and Session
04:07 - Impact of Session Time Zone on Timestamps
05:00 - How PostgreSQL Stores and Displays Timestamps
06:03 - Converting UTC to Local Time Zones
06:40 - The Importance of Using Named Time Zones
07:06 - Using at time zone for Conversion
07:59 - Potential Pitfalls of Using Abbreviations (CST/CDT)
08:58 - The Problem with Hour Offsets
10:30 - Understanding Posix Style Time Zone Specifications
11:55 - Avoiding Mistakes with Time Zone Offsets
12:46 - Listing and Selecting Time Zone Names in PostgreSQL
13:39 - Final Recommendations for Handling Time Zones
Want to learn more Postgres? Check out my Postgres course: https://masteringpostgres.com.
Production ready Postgres for teams that ship fast: xata.io
In this video, I'll show you how to keep your sanity by using best practices (aka the least frustrating way) to handle timezones in PostgreSQL!
Follow me:
Twitter: twitter.com/aarondfrancis
LinkedIn: linkedin.com/in/aarondfrancis
Website: aaronfrancis.com - find articles, podcasts, courses, and more.
Chapters:
00:00 - Introduction to Time Zones in PostgreSQL
00:51 - Why Time Zones Are Frustrating
01:42 - Best Practices for Handling Time Zones
02:24 - Using UTC for Consistency
03:04 - Setting the Time Zone for Your Database and Session
04:07 - Impact of Session Time Zone on Timestamps
05:00 - How PostgreSQL Stores and Displays Timestamps
06:03 - Converting UTC to Local Time Zones
06:40 - The Importance of Using Named Time Zones
07:06 - Using at time zone for Conversion
07:59 - Potential Pitfalls of Using Abbreviations (CST/CDT)
08:58 - The Problem with Hour Offsets
10:30 - Understanding Posix Style Time Zone Specifications
11:55 - Avoiding Mistakes with Time Zone Offsets
12:46 - Listing and Selecting Time Zone Names in PostgreSQL
13:39 - Final Recommendations for Handling Time Zones










