sql – azure DB to timezone does not convert
I am trying to convert the timezone of GETDATE() by using AT TIME ZONE. But for some reason no matter what i do it always stays in UTC. I tried using SYSDATETIMEOFFSET() instead, i’ve also have tried double conversion but it always stays at UTC.
this is the query i used:
SELECT
SYSDATETIMEOFFSET() as base,
SYSDATETIMEOFFSET() AT TIME ZONE 'UTC' AT TIME ZONE 'Central European Standard Time' as option_1,
(SYSDATETIMEOFFSET() AT TIME ZONE 'UTC') AT TIME ZONE 'Central European Standard Time' as option_2,
SYSDATETIMEOFFSET() AT TIME ZONE 'Central European Standard Time' as option_3
;
normally the time should be +1 hour but it all just stays at +0h
Read more here: Source link

