Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > Batch File: Display Current Time Zone

Batch File: Display Current Time Zone

Forum Windows XP : Windows XP General Discussion - Batch File: Display Current Time Zone

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

I'm writing a complex batch file and i require one of the variables in the file to be what the current time zone of the machine is set to.

so far i have:

Quote :

reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation /v standardname | FIND "REG_SZ"



This returns:

Quote :

standardname REG_SZ Eastern Standard Time



All I need is the last part: "Eastern Standard Time" put into a variable.

I'm totally stuck, anyone know how to do this?

I know to change the time zone you do:

Quote :

RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Eastern Standard Time



but i don't need to change it, i need to know what it's set at currently.


Message edited by draxsath on 01-24-2009 at 10:15:27 PM
Sponsored Links
Register or log in to remove.
Tom's Hardware > Forum > Windows XP > Windows XP General Discussion > Batch File: Display Current Time Zone
Go to:

There are 1355 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them