Net time

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Net time

Synchronizes the computer's clock with that of another computer or domain. Used without parameters, net time displays the time for another computer or domain.

Syntax

net time [{\\ComputerName | /domain[:DomainName] | /rtsdomain[:DomainName]}] [/set]

net time [\\ComputerName] [/querysntp] [/setsntp[**:**NTPServerList]]

Parameters
  • \\ ComputerName
    Specifies the name of a server you want to check or with which you want to synchronize.
  • **/domain[ **:DomainName]
    Specifies the domain with which to synchronize clocks.
  • **/rtsdomain[ **:DomainName]
    Specifies the domain of the Reliable Time Server with which to synchronize clocks.
  • /set
    Synchronizes the computer's clock with the time on the specified computer or domain.
  • /querysntp
    Displays the name of the Network Time Protocol (NTP) server currently configured for the local computer or the one specified in ComputerName.
  • **/setsntp[ **:NTPServerList]
    Specifies a list of NTP time servers to be used by the local computer. The list can contain IP addresses or DNS names, separated by spaces. If you use multiple time servers, you must enclose the list in quotation marks.
  • net help Command
    Displays help for the specified net command.
Remarks
  • W32tm.exe is a similar command that is used to synchronize the local computer's time with a remote computer or a domain. Because of its flexibility, W32tm.exe is the preferred method for time synchronization. For more information on W32tm.exe, see Related Topics.
Examples

To display the current time on the computer CORPDC1, type:

net time \\CORPDC1

To synchronize the computer's time with the current time on the domain, type:

net time /domain /set

Formatting legend

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Concepts

Command-line reference A-Z
Command shell overview
W32tm

Other Resources

Net services overview