Subscribe to How-To Geek

Recommended: Click Here to Run a Free Scan for Common PC Errors   [Sponsored Link]

Sync Your Clock With Internet Time Servers from the Vista Command Prompt

If you have an issue with your system clock losing time, you've probably had to go and re-sync your clock with the internet time servers. The problem is that there are just way too many clicks required to get to the right screen, so the command line is much simpler.

Note that you can partially solve this issue by changing the time server you are using or increasing the intervals between time checks, but there are some instances where you'll just want to quickly sync the time manually.

Sync Clock the Slow GUI Way

First you'll have to right-click on the clock and choose "Adjust Date/Time"

image

Then you select the Internet Time tab, and click the Change Settings button…

image

After the UAC prompt you can finally click the "Update now" button to tell the computer to resync.

image

That's a lot of steps… but check out how simple it is from the command line.

Sync Clock from Command Line

Simply open an administrative mode command prompt (right-click, Run as administrator), and then type in the following command:

w32tm /resync

image

And now your clock is sync'd. If you want proof, you could check the time settings panel again.

image

Now that just seems easier to me.

The Geek is the founder of How-To Geek and a geek enthusiast. When he's not coming up with great how-to articles, he's probably writing at his personal blog. This article was written on 01/25/08 and tagged with: Windows Vista, Vista Tips & Tweaks

Comments (12)

  1. Butwheaty

    The command prompt option also works with Windows XP Professional.

  2. mgo

    nice tip! Thanks!

  3. Montana

    Thanks, this has saved me a lot of time…………..;)

    Montana

  4. teknikel

    I get: "The following error occurred:Access is denied. (0×80070005). any ideas?

  5. The Geek

    @teknikel

    You need to be using an administrative mode command prompt.

  6. Scott

    Yes, the cli is easier, but unless you have a cesium clock in your PC, you'll have to do it again, and again as your clock skews. The GUI will keep your PC uptotime

  7. Mick

    @Scott

    You can put the command in a batch file and schedule it to run as often as you want.

  8. The Geek

    @Mick & Scott

    Windows automatically syncs your computer once a week if you have that option turned on. If that's not often enough, you can adjust the interval: http://www.howtogeek.com/howto.....-problems/

    This command line option is most useful for when you need the clock to sync right now. For instance, I have a source control application I use at work that complains if my clock is more than a few seconds off.

  9. fb

    If your computer is on a domain then you don't get that option. I think domain computer's sync with the PDC so does anyone have any tips on how to setup time server syncing for the PDC?

  10. Blue Ridge

    To keep my computer's time current, I use a utility called Dimension 4 from Thinking Man Software ( http://www.thinkman.com/dimension4/ ). It is much more flexible than Windows' built-in Internet Time feature. As an added bonus, you can configure Dimension 4 to be an in-house time server (i.e., one computer [maybe the PDC] syncs with an Internet time server, and your internal computers sync with the Dimension 4 server). I've used this program for years, and I highly recommend it.

  11. John

    What to do if the 3rd tab "Internet Time" is missing?
    Is there anything to be done to "install" it?

  12. mark

    Thanks. For some reason even this command doesn't sync with the internet time. Oh well, I'll do it manually.


Leave a Comment




Leave your friendly comment here. If you have a computer help question, leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.