Skip to main content

Get the current time zone of SQL Server.

declare @TimeZone varchar(50);

exec MASTER.dbo.xp_regread
    'HKEY_LOCAL_MACHINE',
    'SYSTEM\CurrentControlSet\Control\TimeZoneInformation',
    'TimeZoneKeyName',
    @TimeZone out;

select @TimeZone;