RFC 867 INTERNET STANDARD TIME · APPLICATION

Daytime Protocol

A service on port 13 that returns the current date and time as readable text.

On rfc-editor.org ↗
PUBLISHED
May 1983
AUTHORS
J. Postel
STREAM
Legacy
PORT
13 (TCP and UDP)
FORMAT
ASCII string, one line
DOI
10.17487/RFC0867
ERRATA
Reported errata

RFC text

Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                          J. Postel
Request for Comments: 867                                            ISI
                                                                May 1983



                            Daytime Protocol




This RFC specifies a standard for the ARPA Internet community.  Hosts on
the ARPA Internet that choose to implement a Daytime Protocol are
expected to adopt and implement this standard.

A useful debugging and measurement tool is a daytime service.  A daytime
service simply sends a the current date and time as a character string
without regard to the input.

TCP Based Daytime Service

   One daytime service is defined as a connection based application on
   TCP.  A server listens for TCP connections on TCP port 13.  Once a
   connection is established the current date and time is sent out the
   connection as a ascii character string (and any data received is
   thrown away).  The service closes the connection after sending the
   quote.

UDP Based Daytime Service

   Another daytime service service is defined as a datagram based
   application on UDP.  A server listens for UDP datagrams on UDP port
   13.  When a datagram is received, an answering datagram is sent
   containing the current date and time as a ASCII character string (the
   data in the received datagram is ignored).

Daytime Syntax

   There is no specific syntax for the daytime.  It is recommended that
   it be limited to the ASCII printing characters, space, carriage
   return, and line feed.  The daytime should be just one line.

      One popular syntax is:

         Weekday, Month Day, Year Time-Zone

         Example:

            Tuesday, February 22, 1982 17:37:43-PST

Daytime Protocol


      Another popular syntax is that used in SMTP:

         dd mmm yy hh:mm:ss zzz

         Example:

            02 FEB 82 07:59:01 PST

NOTE:  For machine useful time use the Time Protocol (RFC-868).

AI ELI5

On this page
PROBLEMEngineers want a simple way to ask a host for its current date and time as human-readable text.
MECHANISMA server on port 13 sends the date and time as an ASCII string, over TCP followed by closing the connection, or in one UDP datagram. Received data is ignored.
WHY IT MATTERSThe RFC is an Internet Standard for hosts that choose to implement it. It points to the Time Protocol, RFC 868, for a machine-usable time.

§1A Daytime Service

RFC 867 defines the Daytime Protocol. The RFC calls a daytime service a useful debugging and measurement tool that simply sends the current date and time as a character string without regard to the input.

Hosts on the ARPA Internet that choose to implement it are expected to adopt this standard.

It is a machine that tells you the date and time in plain words, whatever you ask it.

§2The TCP and UDP Services

Over TCP, a server listens on TCP port 13. Once a connection is established it sends the current date and time as an ASCII character string and discards any data received. The service then closes the connection.

Over UDP, a server listens on UDP port 13. When a datagram is received, it sends an answering datagram containing the date and time as an ASCII string, ignoring the received data.

You connect or send a note, and the machine writes back the time as a sentence.

§3Daytime Syntax

There is no specific syntax for the daytime. The RFC recommends limiting it to the ASCII printing characters, space, carriage return and line feed, and keeping it to one line.

One popular syntax is Weekday, Month Day, Year Time-Zone, for example Tuesday, February 22, 1982 17:37:43-PST. Another is the one used in SMTP, dd mmm yy hh:mm:ss zzz, for example 02 FEB 82 07:59:01 PST.

The RFC adds a note: for a machine-useful time, use the Time Protocol (RFC 868).

The time is written the way a person would say it. If another computer needs the time as a number, it should use the Time Protocol instead.

§4References