[windows2000] Re: Determine Time Zone from Command Line

  • From: "Sullivan, Glenn" <GSullivan@xxxxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Sun, 14 Mar 2004 19:51:06 -0500

Save this as a .vbs file, and run it at the command line with "CScript <name of 
file>":
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colTimeZone = objWMIService.ExecQuery _
    ("Select * from Win32_TimeZone")
For Each objTimeZone in colTimeZone
    Wscript.Echo "Offset: "& objTimeZone.Bias
    wscript.echo "Caption:"& objTimeZone.Caption
Next

More info about the Win32_TimeZone object here:
http://tinyurl.com/3eeya

Hope this helps,

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc. 

-----Original Message-----
From: windows2000-bounce@xxxxxxxxxxxxx
[mailto:windows2000-bounce@xxxxxxxxxxxxx]On Behalf Of Mike Dillinger
Posted At: Saturday, March 13, 2004 5:37 PM
Posted To: Windows 2000
Conversation: [windows2000] Determine Time Zone from Command Line
Subject: [windows2000] Determine Time Zone from Command Line


Hello list!

Is there any way I can determine the time zone name from the command
line?  The only way I've found so far is to buy the Resource Kit, and
I'd love to avoid that if I can.  I'm running Windows 2000 Professional.

Thanks!
-MikeD

********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: