Time Protocol


The Time Protocol is a network protocol in the Internet Protocol Suite defined in 1983 in RFC 868 by Jon Postel and K. Harrenstein. Its purpose is to provide a site-independent, machine readable date and time.
The Time Protocol may be implemented over the Transmission Control Protocol or the User Datagram Protocol. 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 1 January, 1900 GMT, and closes the connection. Operation over UDP requires the sending of any datagram to the server port, as there is no connection setup for UDP.
The fixed 32-bit data format means that the timestamp rolls over approximately every 136 years, with the first such occurrence on 7 February 2036. Programs that use the Time Protocol must be carefully designed to use context-dependent information to distinguish these dates from those in 1900.
Many Unix-like operating systems used the Time Protocol to monitor or synchronize their clocks using the rdate utility, but this function was superseded by the Network Time Protocol and the corresponding ntpdate utility. NTP is more sophisticated in various ways, among them that its resolution is finer than one second.

Inetd implementation

On most UNIX-like operating systems a Time Protocol server is built into the inetd daemon. The service is usually not enabled by default. It may be enabled by adding the following lines to the file /etc/inetd.conf and reloading the configuration.
time stream tcp nowait root internal
time dgram udp wait root internal