Home > Commands N-Z > Commands N

NET TIME


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Synchronizes the computer's clock with that of another computer or domain, or displays the time for a computer or domain.

This command allows setting the NTP timeserver for computername.


Syntax

NET HELP TIME

NET TIME [\\computer_name | /WORKGROUP:wgname | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET] [/YES]

NET TIME [\\computer_name [/QUERYSNTP] [/SETSNTP[:ntp server list]]

Displays the current date and time at the computer designated as the time server for the domain:

NET TIME


Parameters
\\computer_name (v7.00 Win95 NT3.1)
Is the name of the computer you want to check or synchronize with.

Switches
/DOMAIN:[domainname] (NT3.1)
Specifies to synchronize the time from the Primary Domain Controller of domainname.
/QUERYSNTP (NT2000)
Displays the currently configured NTP server for this computer.
/RTSDOMAIN:[domainname] (NT2000)
Specifies to synchronize with a Reliable Time Server from domainname.
/SET (v7.00 Win95 NT3.1)
Synchronizes the computer's time with the time on the specified computer or domain.
/SETSNTP[:ntp server list] (NT2000)
Sets the NTP time servers to be used by this computer. This may be a list of IP addresses or DNS names separated by spaces. If multiple timeservers are listed, the list must be surrounded by quotes.
/WORKGROUP: wgname (v7.00 Win95)
Specifies the name of the workgroup containing a computer whose clock you want to check or synchronize your computer's clock with. If there are multiple time servers in that workgroup, uses the first one it finds.
/YES (v7.00 Win95 NT4 ONLY)
Carries out the command without first prompting you to provide information or confirm actions.

Related

W32TM NT2000.


Notes

Requires the `server' service to be running on the machine that is serving the time.


Examples

none.


Errorlevels

none.


Availability
External
DOS
v7.00 v7.0R1 v7.10 v8.00
Windows
Win95 Win98 WinME
Windows NT
NT3.1 NT3.5 NT3.51 NT4 NT2000 NTXP NT2003

Last Updated: 2006/12/01
Direct corrections or suggestions to: Rick Lively