all groups > sql server connect > august 2003 >
You're in the

sql server connect

group:

Daylight Savings Time correction



Daylight Savings Time correction Dobromir Rizov
8/26/2003 7:25:21 AM
sql server connect: Hello,

I'm wondering what is solution with automatic correction
for Daylight Savings Time?

I'd like to convert from UTC (column) to local_time but
with automatic correction when the time changes.

Now I use just:

Computed column:

local_time AS DATEADD(hh, -6, UTC)

or

local_time AS DATEADD(hh, -7, UTC) in winter

What is the best approach in this case?


Thx,

Dobby
Re: Daylight Savings Time correction Jacco Schalkwijk
8/26/2003 4:22:27 PM
local_time AS DATEADD(mi, DATEDIFF(mi, GETUTCDATE(), GETDATE()), UTC)

Use minutes when working with timezones, because some timezones have an
offset to UTC that is not a whole number of hours, among them India and, in
your country, Newfoundland.

--
Jacco Schalkwijk MCDBA, MCSD, MCSE
Database Administrator
Eurostop Ltd.


[quoted text, click to view]

AddThis Social Bookmark Button