Offsetting the time zone in MS SQL 2005

Posted by & filed under Development.

I needed to offset the current time in MS SQL 2005 for a quick fix. I wanted to make sure the solution would not have to be maintained when daylight savings time changed. Taking the difference between the GETUTCDATE() and GETDATE() functions will generate the server’s current time zone offset from UTC time. DECLARE @timezoneOffset… Read more »