Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Update computer date, time, and timezone  (Read 7339 times)

0 Members and 1 Guest are viewing this topic.

nfin8rider

    Topic Starter


    Rookie

    • Experience: Beginner
    • OS: Windows 7
    Update computer date, time, and timezone
    « on: January 14, 2013, 12:32:06 PM »
    Is there any way to update the current date, time, and timezone from time.gov or time.windows.com without requiring the user to make any manual adjustments?  I currently have my script to do a resync, but it doesn't automatically update the current date, time, and timezone if they're incorrect.  For my work-around, I start the timedate.cpl so the user manually configures it, but I need something that is automated.

    w32tm /resync >nul

    nfin8rider

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Windows 7
      Re: Update computer date, time, and timezone
      « Reply #1 on: January 14, 2013, 04:17:44 PM »
      I found this script but coming up with errors with the first line.  My next big issue is setting timezone, is there anyway the time servers can set time zone by iprecognition?

      w32tm /config /sychfromflags:manual /manualpeerlist:time.nist.gov
           -The following arguments were unexpected:
           -/sychfromflags:manual
      net stop w32time && net start w32time
      w32tm /config /update
      w32tm /resync /force

      To clarify the purpose of this script is simply to update my companies customers time and date to prevent a login loop issue.  I'm not doing anything malicious at all for those who may think otherwise.  I would appreciate any help that I can get on this.  Thank you.

      nfin8rider

        Topic Starter


        Rookie

        • Experience: Beginner
        • OS: Windows 7
        Re: Update computer date, time, and timezone
        « Reply #2 on: January 14, 2013, 05:22:01 PM »
        I figured it out.  For those of you who need a script to automate the Date, Time, and Timezone to update, here you go:

        w32tm /config /manualpeerlist:time.nist.gov
        net stop w32time && net start w32time
        w32tm /config /update
        w32tm /resync /force
        tzutil.exe /s "Enter Time Zone"

        If you want to know the list of time zones available, enter:  tzutil /l in the command line.