Handling time zones and daylight savings time in .NET and SQL Server 08R2+

Hi Experts,

     Is there a standard way to handle (record/display/report) time sensitive data that is generated accross time zones and daylight savings time?  We're in a .NET and SQL Server 08R2+ environment!  

I am seeing things about recording all time stamps in UTC time and then adding the TZoffset to it and using a lookup table (ISO-3166 country code) to account for the DST on top of the time zone calculation!  Is this the "correct" or "standard" way of doing it?

Also, I am seeing built in functionality in SQL to calculate local time from UTC

dateadd(minute, datepart(TZoffset, sysdatetimeoffset()), @InputUtcDateTime)

but is there anything built in to handle DST as well?

Who is Participating?
Bob LearnedCommented:
SQL Server 2008 has new elements for time zone adjustment, as described here:

Using time zone data in SQL Server 2008
axnst2Author Commented:
Thanks!  That's a big help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.