12

How can I query the current timezone setting for an SQL server with respect to some offset like UTC?

Stevoisiak
  • 111
  • 6
pavanmanideep
  • 131
  • 1
  • 1
  • 3

1 Answers1

12
DECLARE @TimeZone VARCHAR(50)
EXEC MASTER.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SYSTEM\CurrentControlSet\Control\TimeZoneInformation','TimeZoneKeyName',@TimeZone OUT
SELECT @TimeZone