Table of Contents Implementations
TCP/IP Tutorial and Technical Overview

4.22 Time and Daytime Protocols

Time is a standard protocol. Its status is elective. The current TIME specification can be found in RFC 868 - Time Server Protocol.

Daytime is a standard protocol. Its status is elective. The current daytime specification can be found in RFC 867 - Daytime Protocol.

4.22.0.1 Concept

The time protocol provides a machine-readable date and time. It uses TCP or UDP as the transport vehicle. Port 37 (decimal) is used.

  1. Used via TCP:
  2. S: listen on port 37
  3. C: connect to port 37
  4. S: send the time as a 32-bit binary number
  5. C: receive the number
  6. C: close the connection
  7. Used via UDP:
  8. S: listen on port 37
  9. C: send empty datagram to port 37
  10. S: receive empty datagram
  11. S: send datagram containing the time as a 32-bit number
  12. C: receive the datagram

The 32-bit number represents the number of elapsed seconds since midnight on January 1st 1900 (GMT). It is suitable for a machine to set its own clock to this, but it is not very human-readable.

The daytime protocol is similar in concept, but the server will now send a readable ASCII character string back to the client. The format of this ASCII string is not formalized. Port 13 (decimal) is used for this protocol.

4.22.0.2 Implementations

AIX/6000 provides both the client and server functions. The server function is included in the base inetd process; the client part is provided through the setclock command.

TCP/IP for DOS provides the client function with the setclock command.

Table of Contents Other Application Protocols