Learn T-SQL With Erik: Time Zone Confusion
In this video, I dive into the fascinating and sometimes frustrating world of time zone handling in SQL Server. I share a real-world problem I encountered recently, which led to a detailed exploration of how SQL Server manages time zones and the potential pitfalls of dealing with daylight saving time (DST) changes. I explain the importance of storing data in UTC to avoid issues during time zone transitions and discuss the non-deterministic nature of the 'AT TIME ZONE' function, which can complicate performance optimizations. Join me as we navigate through the complexities of time zone management and learn how to handle these challenges effectively in your SQL Server databases. CHAPTERS 00:00:00 - Introduction 00:02:30 - Time Zone Ambiguity Explained 00:05:15 - Example with Non-Existent Time 00:07:45 - Daylight Saving Time Ambiguity 00:10:30 - Non-Deterministic Nature of AT TIME ZONE 00:12:00 - Conclusion ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🕵️♂️ FREE SQL SERVER MONITORING & Plan Analysis ━━━━━━━━━━━━━━━━━━━━━━━━━━ https://github.com/erikdarlingdata/PerformanceMonitor https://github.com/erikdarlingdata/PerformanceStudio https://plans.erikdarling.com/ ━━━━━━━━━━━━━━━━━━━━━━━━━━ 📚 TRAINING & COURSES ━━━━━━━━━━━━━━━━━━━━━━━━━━ Get AI-Ready With Erik https://training.erikdarling.com/get-ai-ready-with-erik?coupon=AIREADY SQL Server Performance Engineering Course https://training.erikdarling.com/sql-server-performance-engineering?coupon=ENGINEERING Learn T-SQL with Erik https://training.erikdarling.com/learn-t-sql-with-erik?coupon=ADVANCEDTSQL Everything Bundle: https://training.erikdarling.com/?coupon=SPRINGCLEANING ━━━━━━━━━━━━━━━━━━━━━━━━━━ 🛠️ CONSULTING & SERVICES ━━━━━━━━━━━━━━━━━━━━━━━━━━ Need SQL Server performance help? https://training.erikdarling.com/sqlconsulting ━━━━━━━━━━━━━━━━━━━━━━━━━━ 💬 CONNECT ━━━━━━━━━━━━━━━━━━━━━━━━━━ Ask questions at Office Hours https://erikdarling.com/officehours/ Become a channel member https://www.youtube.com/@ErikDarlingData/join