Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


How to Determine the Time Zone I Am In

Keywords: 	 dtermine the time zone timezone

Question:

How do I determine that time zone I am in? Specifically, the difference between local time and GMT - Central Standard is -6 hours, but how can I find this out with Winbatch?

Answer:

Kinda depends on the version of Windows. MS has been twiddling with this for a while.

Try

ActiveTimeBias=RegQueryDword(@REGMACHINE, "System\CurrentControlSet\control\TimeZoneInformation[ActiveTimeBias]")

GMTBiasHours= -(ActiveTimeBias/60)
Message("Current GMT Time Bias",GMTBiasHours)

Exit