Monday 19 April 2010

Find TimeZone of server

Declare @temp Table (Cmdoutput varchar(max))

Insert into @temp
Exec xp_cmdshell 'reg query HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation /v StandardName'
select Ltrim(REPLACE(CmdOutput, 'StandardName' + CHAR(9) + 'REG_SZ', '')) from @temp where Cmdoutput like '%standardName%'

No comments:

Post a Comment