pointers, solutions and scripts for the SQL DBA
not intended to replace msdn, common sense or oxford commas

Monday, July 31, 2017

Twilight TimeZone: Handling Time in Your App Architecture at SQLSaturday Baton Rouge

Thanks to everyone who joined my colleague Steve Schaneville and me for a presentation on date/time data architecture in modern applications. Steve and I are the principal consultants for appdev and SQL Server respectively at Sparkhound, and figured that a joint presentation on this topic would be valuable.

It was! We got a lot of great questions and positive feedback from our first audience at SQLSat Baton Rouge 2017, as well as a ton of notes to add to our presentation the next time, which will likely be at Houston Tech Fest 2017 in September.

We reviewed the SQL and .NET architecture for date/time storage an informative and thought-provoking talk about handling timezones in your application architecture. Dealing with Time Zones is disconcerting, rarely straightforward, and often complicated! In the end, our architecture recommendations lead to two likely best paths - either using datetimeoffset (and optionally also storing the Time Zone information in a separate field) or storing the date and time in separate fields. There are little advantages to storing only UTC data or all-in-one time zone data.

You can download the slidedeck and sample code here.


Our presentation at SQLSatBR 2017

No comments: