SQL Server UTC Local Time

is there a function in SQL Server that returns the difference between UTC time and local server time?

+3
source share
1 answer

If you are using SQL 2008, then using datetimeoffset and related functions is much better. But, assuming you are talking about the current offset, you can do something like:

DATEDIFF(minute, GETUTCDATE(), GETDATE())
+4
source

Source: https://habr.com/ru/post/1787615/


All Articles