net time \\[workstation] /set /yes :: Synchronizing Network Time
October 25, 2007
Problem:
We’ve got this parent company up in India, we’re in the Philippines and they would like us to sync with the time they’re using on their servers in India. You would normally assume that in these days people would be using NTP (Network Time Protocol) servers and use the generally accepted time. That’s before we check the servers’ time. The time on their servers are about 12 to 15 minutes late from the rest of the world. Wow! Maybe that’s the reason why their record books shows that they come early to work.
Solution:
We cannot use NTP servers since the IT people on the other side refuse to accept that their time is a bit late. Or maybe they just don’t want to come in 12 to 15 minutes earlier. Which is what is suppose to happen if we are to adjust to the generally accepted time.
Whatever the reason is, after hours of trial and error, research, and prayer. The solution is pretty simple.
1) Manually sync one of the local machine to their server. Let’s call this machine time_server.
2) For the rest of the machines, take the time from time_server.
3) And set the machine’s time to what is taken from time_server.
This is all done with one command line on the machines.
net time \\time_server /set /yes
where: time_server = computer name or the time server
This will return something like the following lines:
—
Current time at \\time_server is 10/25/2007 11:09 AM
The command completed successfully.
–
Package this command in a shortcut by doing a right click on your desktop or on any windows explorer pane and select New>>Shortcut. Follow the instructions and paste the line “net time \\time_server /set /yes“. Put this on you startup folder and you’ll be in sync with time_server’s time every time the agents login to their stations.
In order for this to work you must have permission to access the time_server. You could either use auto login or disable access restriction to the time_server. No installation is needed. The “net time” command is available in MS Windows XP by default.
Source:
Using NET TIME for all Workstations and Servers
Files:
synctime.zip – batch file for synchronizing network time.
Note:
If you only want to check the time without setting the local machine’s time use the same command “net time \\time_server” but without the “/set /yes“.
For those who update their time from the Internet, Microsoft’s NTP server (time.windows.com) no longer works. Same as with time.nist.gov that MS Windows XP uses as a default. Instead use www.pool.ntp.org and find the nearest NTP server to your location.
Filed under: MS DOS |
Comments (0)
Related Links:
