Time Protocol
also
- std-26
Extracted elements (10)
Not all systems have a hardware date/time clock, and all are subject to occasional human or machine error. Polling several independent time-servers on the network allows a host to quickly confirm or correct its local time.
The epoch is defined as midnight 1 January 1900 GMT because this base will serve until the year 2036. Example calibration points are given: 2,208,988,800 equals 00:00 1 Jan 1970 GMT (the Unix epoch).
The 32-bit seconds-since-1900 representation overflows after the year 2036. Implementations relying on this epoch without extension will cease to function correctly at that point.
If the TCP server is unable to determine the time at its site, it should either refuse the connection or close it without sending anything.
If the UDP server is unable to determine the time at its site, it should discard the arriving datagram and make no reply.
Over TCP, the server listens on port 37. Upon connection, the server immediately sends a 32-bit time value and closes the connection; the client receives the value and then closes its end.
Over UDP, the server listens on port 37. The client sends an empty datagram to port 37; the server responds with a datagram containing the 32-bit time value.
The Time Protocol is assigned port 37 (octal 45) for both TCP and UDP transport.
RFC 868 includes no security considerations section and provides no authentication, integrity protection, or confidentiality for the time value. A network-level adversary can forge or replay time responses to manipulate a host's clock. The protocol should be used only in trusted network environments.
The time value is a 32-bit binary number representing the number of seconds since 00:00 (midnight) 1 January 1900 GMT. This same encoding is used in both TCP and UDP modes.