In tip 0398, we described the time zone information in the registry.
Using tip 0170, you can download the REG freeware.
To check the time zone on a remote (or local) computer, type:
JSITZ <ComputerName> \[/n\]
NOTE: You can also use JSITZ \\<ComputerName> \[/n\]
Example: To check the time zone on remote computer JSI002:
JSITZ JSI002
This returns a TZ environment variable. JSI002 is located in Alpharetta, Georgia - USA,
so TZ is set to "Eastern Standard Time".
If the <ComputerName> is not found, as in JSITZ XYZ,
TZ is set to "key \\XYZ\MACHINE\System\CurrentControlSet\Control\TimeZoneInformation"
NOTE: The optional /n switch suppresses the display.
NOTE: To check the time zone on your local computer, you can use JSITZ %ComputerName%
JSITZ.bat contains:
@echo off setlocal set machine=%1 set machine=%machine:"=% set machine=%machine:\=% for /f "Tokens=1*" %%i in ('reg -lv "\\%machine%\MACHINE\System\CurrentControlSet\Control\TimeZoneInformation\StandardName"') do set TZ="%%j" if /i not "%2"=="/n" @echo %TZ% endlocal&set TZ=%TZ%