Jump to content

Time Protocol

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Kbrose (talk | contribs) at 20:04, 12 August 2010 (copyedit, remove extensive discussion of (x)inetd, not subject of article). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Time Protocol is a network protocol in the Internet Protocol Suite defined in 1983 in RFC 868. Its purpose is to provide a site-independent, machine readable date and time.

The Time Protocol may be implemented over the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). A host connects to a server that supports the Time Protocol on port 37. The server then sends the time as a 32-bit unsigned integer in binary format and in network byte order, representing the number of seconds since 00:00 (midnight) 1 January, 1900 GMT, and closes the connection. Operation over UDP requires the sending of any datagram to the server port, as there is not connection setup for UDP.

The Time Protocol is used by the rdate command, available on most Unix-like operating systems.

The functionality of the Time Protocol has been superseded by the Network Time Protocol (NTP).

Inetd implementation

On FreeBSD, Linux, and other UNIX-like operating systems a time server is often built into the inetd (or xinetd) daemon. The time service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf

time   stream  tcp     nowait  root    internal
time   dgram   udp     wait    root    internal

and reloading the configuration.

On OpenBSD, inetd is configured to support the service by default.

See also