RFC 867 INTERNET STANDARD TIME · APPLICATION

Daytime Protocol

Defines a service that returns the current date and time as text.

On rfc-editor.org ↗
PUBLISHED
May 1983
AUTHORS
J. Postel
STREAM
Legacy
TCP AND UDP PORT
13
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).

ISO Plain Language

On this page
PROBLEMA simple service is useful for asking a host for the current date and time in a human-readable form.
MECHANISMA server on port 13 sends a date-and-time string over TCP or returns one in response to a UDP datagram, ignoring the input.
WHAT IT PROVIDESThe RFC recommends a one-line ASCII response and points readers to the Time Protocol when machine-usable time is needed.

§1A Readable Date and Time

The Daytime service sends the current date and time as a character string without regard to the input. The RFC describes it as a useful debugging and measurement tool for hosts that choose to implement it.

The service tells a client the current date and time in text. It does not interpret the data sent to it.

§2TCP and UDP Services

For TCP, a server listens on TCP port 13. After the connection is established, it sends the current date and time as an ASCII string, ignores received data, and closes the connection.

For UDP, the server listens on UDP port 13. Each incoming datagram receives an answering datagram with the current date and time as an ASCII string.

Over TCP, the server sends the time and then closes the connection. Over UDP, each request gets one datagram containing the time.

§3Writing the Time

The RFC defines no specific format for the date and time. It recommends ASCII printing characters, spaces, carriage return, and line feed, and recommends that the response fit on one line.

The memo gives two popular text formats and says to use the Time Protocol, RFC 868, when a machine-usable time value is needed.

The response is meant for people to read, and the RFC does not require one exact date format. For time that a program can use directly, the memo points to the Time Protocol.

§4References