Synchronize Time via the Network

When sharing files on a network ( especially when sharing a database ), it is important
that all systems using the network use the same time (not having their clocks off by several
minutes or more)
.
Windows provides an easy method to keep the system clocks synchronized using the
option "TIME" of the NET-command (to display the syntax of this command, open a
Command-windows ["DOS-box"] and type: NET TIME /? ):



You use the "NET TIME" command in a Command-window ("DOS-box") or
in a BATCH-file:

In the most basic format, NET TIME displays just the Date/Time of the system
clock of the specified computer. The option " /SET" stores this Date/Time info
to your local system-clock ("Synchronizes the time"), still prompting you to confirm
this adjustment. Defining the option " /YES" will synchronize the time without the prompt.


When connecting to a Windows NT-server, the NET TIME-command is usually
part of the Logon-script.

In a workgroup-network ("peer-to-peer" without an NT-server ) :
To automate this synchronization, use NOTEPAD to create a BATCH-file
( I stored / named the file "C:\synctime.bat" ) containing the line:
NET TIME \\computer /SET /YES

Then create in the STARTUP-folder a short-cut to this BATCH-file
( right-click on an unused part of your Windows taskbar, select "Properties", then select
the tab: "Start Menu Programs", click on "Advanced", locate the folder "STARTUP" in
"Start Menu" / "Programs", click on it, then drag with the RIGHT-mouse-button the icon
of the BATCH-file to this folder, on releasing the mouse-button select "Create Shortcut"):



Right-click on the Shortcut to the
BATCH-file and select "Properties".
tab: Program

To avoid a command-window to
show up and to stay on the screen,
select to: Run : Minimized
and also to

About Johannes Helmig

Dr.Johannes Helmig is working as Director, Technical Knowledge Management in the Belgium office of Gerber Technology where he is involved in Customer Service and internal training, with special interest in Networking.

Click here for Johannes Helmig's section.

Share this article

Receive all the latest articles by email!

Get all articles delivered directly to your mailbox as and when they are released on WindowsNetworking.com! Choose between receiving instant updates with the Real-Time Article Update, or a monthly summary with the Monthly Article Update. Sign up to the WindowsNetworking.com Monthly Newsletter, written by Dr. Tom Shinder, containing news, the hottest tips, Networking links of the month and much more. Subscribe today and don't miss a thing!



Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Anti Virus Appliance solution?