How select time zone in timedate.cpl? (batch command)

J

Jonno

What single command (for use in a batch file) will change the PC's
time zone to GMT+10

Is there a line command which will do this directly?

----------

I have started to look at the "Time And Date" control panel but it
doesn't quite do what I want ...

The following command opens the "Time And Date" control panel and
selects the time zone tab. But what do I do to automatically select
the GMT+10 setting and then close the control panel?

rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1
 
P

Pegasus [MVP]

Jonno said:
What single command (for use in a batch file) will change the PC's
time zone to GMT+10

Is there a line command which will do this directly?

----------

I have started to look at the "Time And Date" control panel but it
doesn't quite do what I want ...

The following command opens the "Time And Date" control panel and
selects the time zone tab. But what do I do to automatically select
the GMT+10 setting and then close the control panel?

rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1

There is a tool tz.exe that let you do this:

usage: TZ [-b Bias] [-s Name Bias Date] [-d Name Bias Date]
Where...
Default with no parameters is to display current time zone settings.

Unfortunately I do not know where I got the tool from. I suspect that
Microsoft made it available when the Commonwealth Games caused the
Australian Government to defer the end of Daylight Saving. Post again if you
cannot find a download site. You could also hack the registry directly -
there are some explicit instructions here:
http://www.freerepublic.com/focus/f-news/1565208/posts.
 
J

Jose

What single command (for use in a batch file) will change the PC's
time zone to GMT+10

Is there a line command which will do this directly?  

----------

I have started to look at the "Time And Date" control panel but it
doesn't quite do what I want ...

The following command opens the "Time And Date" control panel and
selects the time zone tab. But what do I do to automatically select
the GMT+10 setting and then close the control panel?

rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,,1

I am not sure which of those ideas is supposed to answer your question
about how to adjust the time zone from a single command you can use in
a batch file, but this link is one of several found by a Google search
for:

xp change time zone command line

http://itknowledgeexchange.techtarg...rator/how-to-set-time-zone-from-command-line/

To change Time Zone to Jerusalem (GMT+02:00) run the following
command:

RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z (GMT+02:00)
Jerusalem

Look in the registry and/or timedate.cpl for installed zones:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones

Nothing to download, nothing to try - use what you already have.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top