Hi,
I think i know the answer but i just wanted second opinion.
An application i have writes to a database from a VM, the datetime stamps appear to go in using UTC time - so currently in UK the clocks went back 1 hour for daylight savings time
so an 8am entry goes in at 7am however i have another application that pulls information out of the database but showing out of sync using an extractor i wrote using sql.
so my question here is:
Does 'GetUTCTime()' function always return the base time without daylight savings time as i need to make the change now but i dont want it to mess up when the clocks go back again, i am using this to adjust the timestamp on the SQL select statement.
Please can you confirm if it will do the trick when the clocks go back, it works now that we are in DST.
DECLARE @DSTTIME AS TIME =
(CASE
WHEN DATEDIFF(HOUR, GetUtcDate(), GetDate()) = 1
THEN CONVERT(datetime, '01:00:00',120)
ELSE CONVERT(datetime, '00:00:00',120)
END)