RFC 868

Time Protocol

πŸ“… published May 1983, from ietf

Time Protocol ✨

okay bestie, RFC 868 is the Time Protocol and it's giving clock-sync glow-up πŸ’–πŸ•°οΈ

  • Network Working Group, Request for Comments: 868 🌸
  • Authors: J. Postel (ISI) and K. Harrenstien (SRI) 🧚
  • Date: May 1983 πŸ“…
  • Category: this one specifies a standard for the ARPA Internet community πŸ‘‘
  • Obsoletes: nothing listed πŸ™ˆ
  • Updates: nothing listed πŸ™ˆ

This doc is for the ARPA Internet community. Hosts on the ARPA Internet that choose to implement a Time Protocol are expected to adopt and implement this standard πŸ’…

The protocol gives you a site-independent, machine-readable date and time πŸ¦‹ The Time service sends the time back to whoever asked, as seconds since midnight on January first 1900.

Why do we even need this? πŸ€” Not every system has a date/time clock, and everybody is subject to the occasional human or machine error πŸ™ˆ Time-servers let you quickly confirm or correct your system's idea of the time by making a brief poll of several independent sites on the network. Main character energy for your clock ✨

This protocol can run either above the Transmission Control Protocol (TCP) or above the User Datagram Protocol (UDP) πŸŽ€

TCP Version 🧚

When you use TCP, the time service goes like this:

   S: Listen on port 37 (45 octal).

   U: Connect to port 37.

   S: Send the time as a 32 bit binary number.

   U: Receive the time.

   U: Close the connection.

   S: Close the connection.

The server listens for a connection on port 37. Once the connection is established, the server sends back a 32-bit time value and closes the connection πŸ’œ If the server can't figure out the time at its site, it should either refuse the connection or close it without sending anything. Honest, no drama 😭

UDP Version 🌈

When you use UDP, the vibe is a little different:

   S: Listen on port 37 (45 octal).

   U: Send an empty datagram to port 37.

   S: Receive the empty datagram.

   S: Send a datagram containing the time as a 32 bit binary number.

   U: Receive the time datagram.

The server listens for a datagram on port 37. When one arrives, the server sends back a datagram with the 32-bit time value ⭐ If the server can't determine the time at its site, it should discard the arriving datagram and make no reply. Ghosted, but make it iconic πŸ’€


The Time πŸ•°οΈ

The time is the number of seconds since 00:00 (midnight) 1 January 1900 GMT. The time 1 is 12:00:01 am on 1 January 1900 GMT. This base will serve until the year 2036, so we're solid for a while πŸ”₯

Here are some examples so you can see the math slay:

   the time  2,208,988,800 corresponds to 00:00  1 Jan 1970 GMT,

             2,398,291,200 corresponds to 00:00  1 Jan 1976 GMT,

             2,524,521,600 corresponds to 00:00  1 Jan 1980 GMT,

             2,629,584,000 corresponds to 00:00  1 May 1983 GMT,

        and -1,297,728,000 corresponds to 00:00 17 Nov 1858 GMT.

Bestie, that's the whole protocol πŸŒˆπŸ’… Clocks, polls, and seconds since 1900. Iconic πŸ‘‘

πŸ“¦ where this page comes from