Re: Script to change time zone?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Try these at a Command Prompt, pressing enter after each:

w32tm /config /syncfromflags:manual /manualpeerlist:time.nist.gov,0x8

w32tm /config /update

w32tm /resync


In the first command you can change the time.nist.gov server with your preferred server, or you can have more than one server if you separate them by commas.

John

biggles wrote:

I don't know if it's a coincidence or not, but lately I have been unable to get either of my two machines to sync with either of the internet time servers I usually use (MS, and NIST). I get an error message that says that "the peer's stratum is less than the host's stratum."

I can't find mention of this error message anywhere. Anyone have a clue? I'm running XP SP2 on both of them, and used to be able to automatically update the time.



"John John" wrote:


mlcooper@xxxxxxxxx wrote:


On Apr 5, 11:05 pm, John John <audetw...@xxxxxxxxxxx> wrote:


Search on these and you will find what you need:

RunDLL32 shell32.dll,Control_RunDLL %SystemRoot%\system32\TIMEDATE.cpl,,/Z

CONTROL.EXE TIMEDATE.CPL,,/Z

John



mlcoo...@xxxxxxxxx wrote:


Does anyone know of a script that will change the time zone of a
windows xp sp2 machine? I'm going to need to change the timezone on
about 50 machines all on the same day, and I was wondering if there is
a script out there that will do this for me to speed up the process.- Hide quoted text -

- Show quoted text -


I figured it out. Here is what I did. I manually changed the time
zone in the control panel to the time zone I'm going to need
(Barcelona, Spain), and exported the timezone key from the registry
(HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation). I also
exported my current Eastern Time zone settings from this same key and
put it in a different reg file.

I then got the timezone database refresh script from Microsoft and
wrote my .bat file. So the .bat file to change the time zone first
merges the reg key with the timezone information that I want, and then
runs a .vbs script to refresh the timezone database. It seems to work
perfectly.

Yes, that will work. Just make sure that you have the right information in the keys. There have been a lot of people with time zone problems after the recent changes.

John


.



Relevant Pages

  • Re: how to make dates without timezones?
    ... class, with a unique format on the wire, so that you don't accidentally ... after on a change in timezone. ... access/display the date it is in the same timezone that the server is ... No, make sure it is *always* treated as a specific time zone, regardless ...
    (comp.lang.java.programmer)
  • Re: how to make dates without timezones?
    ... Date it automatically assigns the timezone. ... with 0 hours, 0 minutes, 0 seconds and the time zone of the server. ... My application is a client server app using rmi. ...
    (comp.lang.java.programmer)
  • Re: Date problem
    ... So any time displayed by the server -- be it current time or a file timestamp -- is going to be either two, ... I don't really want to have to ask the user what time zone he is in, because I'm sure that at least a few of them won't know how to answer the question. ... How do I get a Web page to display the current date OF MY BROWSER ... locale they are in, nor, specifically, what timezone. ...
    (comp.lang.php)
  • Re: Date problem
    ... I have a Web site that's hosted on a server three time zones west of here. ... I have users who are located in this time zone and in time zones immediately ... As far as I am aware, the browser does not notify the server what ... locale they are in, nor, specifically, what timezone. ...
    (comp.lang.php)
  • Re: Date problem
    ... even what a time zone is. ... time zone of the client, ... As far as I am aware, the browser does not notify the server what ... locale they are in, nor, specifically, what timezone. ...
    (comp.lang.php)