CREATE TABLE dbo.Src_DateTime
(
ColDatetimeoffset datetimeoffset
);
GO
--Returns: 2019-09-26 09:59:34.260
--Returns(UTC): 2019-09-26 13:59:34.260
SELECT GETDATE() AS Current_DateTime
,GETUTCDATE() Current_UTC_DateTime
GO
--Returns: 2019-09-26 09:59:34.2600000 -04:00
DECLARE @CurrentDateTimeUTC datetime2 = '2019-09-26 13:59:34.260'
SELECT @CurrentDateTimeUTC AT TIME ZONE 'UTC'
AT TIME ZONE 'Eastern Standard Time'
GO
SELECT DateDiff(minute, GetUTCDate(), GetDate()) OffSet
GO
--Add timezone offset with DateTime
INSERT INTO dbo.Src_DateTime
VALUES ('2019-09-26 09:59:34.260 -4:00');
GO
--Returns: 2019-09-26 09:59:34.2600000 -04:00
SELECT ColDatetimeoffset
FROM dbo.Src_DateTime;
GO
--Returns: 2019-09-26 13:59:34.2600000 +00:00
SELECT SWITCHOFFSET (ColDatetimeoffset, '+00:00')
FROM dbo.Src_DateTime;
GO