WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time - Timer and Date Functions
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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

Article ID:   W15719
File Created: 2003:05:13:11:29:48
Last Updated: 2003:05:13:11:29:48