Recipe 6.2. Automatically Setting the Time on a PC Not Connected to a Domain


Problem

You're on a PC that is not connected to a domain, and you want the PC to automatically have its clock set to the proper time without your intervention.

Solution

Using a graphical user interface

  1. Double-click the time on the right side of the Taskbar.

  2. From the Date and Time Properties dialog box that appears, click the Internet Time tab.

  3. Check the box next to Automatically synchronize with an Internet time server (Figure 6-2). You can choose from a list of servers on the Server drop-down box. To synchronize the time immediately, click Update Now.

    Figure 6-2. XP includes the built-in ability to automatically synchronize your clock with an Internet time server


  4. Click OK. Your PC will now synchronize with a time server once a week.

Using the Registry

The default amount of time for synchronizing with a time server is once a week. But you can change that schedule to any you want, using the Registry. Open the Registry Editor, and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\ TimeProviders\NtpClient\SpecialPollInterval. Open SpecialPollInterval by double-clicking it, then select Decimal. For the value data, give it the interval, in seconds, that you want your time to be automatically updated. The default is 604,800, which is the number of seconds in a week. There are 86,400 seconds in a day, so if you want your time to synchronized daily, enter that number. Click OK and then exit the Registry.

Using downloadable software

There are many pieces of software available that make it easier to automatically synchronize the time, or give you extra options for time synchronization. A very good free one is SymmTime, which runs as a separate applet. In addition to automatically synchronizing your PC time with Internet time servers, it lets you create separate clocks that each display the time in different parts of the world. It's particularly useful if you do business across time zones or countries. You can download and use it for free from http://www.ntp-systems.com/symmtime.asp.

Discussion

If you don't have an always-on connection such as over a LAN or via a cable modem or DSL modem, and your PC isn't connected at the time it is scheduled to do a synchronization, you may have to synchronize your clock manually, by clicking the Update Now button on the Internet tab of the Date and Time Properties dialog box.

Sometimes, synchronization fails. If so, there are several ways to troubleshoot the problem. First, check to make sure that your Internet connection is working and you're connected. If you are, the problem may be with the time server it might not be available. Choose another one from the list. You can also add new time servers to the list by typing their addresses in the Server box on the Internet tab of the Date and Time Properties dialog box. For lists of servers, go to http://www.boulder.nist.gov/timefreq/service/time-servers.html and http://tycho.usno.navy.mil/ntp.html.

Some personal and network firewalls block time synchronization. Check the firewall's documentation for how to allow synchronization. The Windows Firewall allows time synchronization, so if you're using that, you should not have a problem. Windows Time uses UDP port 123 to do its synchronization, so if your firewall is blocking it, open that port, and synchronization should work.

Finally, on the Date & Time tab of the Date and Time Properties dialog box, make sure that your computer is using the proper date. If your date is incorrect, your PC will not synchronize with Internet time servers.

See Also

MS KB 262680, "A List of the Simple Network Time Protocol Time Servers That Are Available on the Internet"



Windows XP Cookbook
Windows XP Cookbook (Cookbooks)
ISBN: 0596007256
EAN: 2147483647
Year: 2006
Pages: 408

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net