惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
D
Docker
云风的 BLOG
云风的 BLOG
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
G
Google Developers Blog
GbyAI
GbyAI
T
Tailwind CSS Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
C
Check Point Blog
I
InfoQ
Microsoft Azure Blog
Microsoft Azure Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
N
Netflix TechBlog - Medium
B
Blog RSS Feed
腾讯CDC
aimingoo的专栏
aimingoo的专栏

Jeff Geerling

NTP, an atomic clock, and having a great time at the world OpenNMC is an open replacement for expensive APC management cards Rebuilding a 1995 GPS Time Server so I don Building a mini Homelab that fits in my carry-on Debugging Ubiquiti Getting the Steam Deck LCD working on a Raspberry Pi Hands-on with Raspberry Pi I Proxmox officially supports Arm, with some caveats Getting 25 Gbps Thunderbolt Ethernet on my Mac Studio Adding a backup Internet WAN on my OPNsense Router Open Sauce and GPS time were my summer AI Antiseptics QuadRF can spot drones and see WiFi through my wall The Special Value Pi 4 was extremely short-lived Quickly apply LUTs (color grading) with ffmpeg Framework You can finally power on a Mac remotely I tested every IP KVM in my Homelab It's hard to justify buying a Framework 12 Tuning in FM Radio on a 3D Printer Heatbed I patched iozone for better disk benchmarks on modern macOS News about Raspberry Pi 6 and Microcontroller Development Wi-Wi Is Wireless Time Sync at 1 nanosecond Bambu Lab is abusing the open source social contract HomePod mini feels like magic, but it's just good timing SBC Clusters are a terrible value, but they're fun anyway Raspberry Pi Connect may control Windows soon New 10 GbE USB adapters are cooler, smaller, cheaper An Arm Mainboard for the Framework Laptop Build your own Dial-up ISP with a Raspberry Pi
Before NTP there were Time and Daytime
jeff@jeffgeerling.com (Jeff Geerling) · 2026-08-31 · via Jeff Geerling

In building an NTP time demo on old Macs for VCF Midwest, I came across RFC 867 and RFC 868, for the 'Daytime' and 'Time' Protocols, respectively.

RFC 867 Daytime Protocol

My first exposure to any form of network time was when I upgraded from a used PowerBook 180c to my first 'new' computer, a Power Mac G3, in 2000. With the introduction of Mac OS 8.5, Apple added a 'Network Time Server' option in the Date & Time Control Panel.

I remember dialing up the Internet via PPP, then clicking the 'Set Time Now' button, and seeing my computer's clock update. I didn't think much of it at the time, but this was way more than setting my wristwatch using the 'Time and Temperature' phone line, which was previously the most precise time source I could access regularly.

But prior to NTP (RFC 1059 in 1988), there was a much more informal way of requesting time from a remote server. With the Time Protocol (RFC 868), a time request was as simple as:

  1. Open a connection to the server on port 37 (TCP connect, or send an empty UDP datagram)
  2. Receive the time as a 32-bit binary number

That's it!

In the mid-80s, this was an extremely efficient method of time transfer, which was helpful since network bytes were precious, and you didn't need a complex routine to handle the 32-bit time.

But there are downsides to this simplistic approach. Especially if you were routing the request through the Internet, with multiple non-deterministic hops:

  • The 32-bit number was just "seconds since 00:00 (midnight) 1 January 1900 GMT", so the best timing resolution you could ever get is 1 second (NTP gives 64-bit resolution, which can scale past microseconds).
  • There is no timestamping of the actual request or response, so there's no way to account for network delays, or average them out over time.
  • The 32-bit integer value will run out on February 7, 2036, resulting in a 'Y2K36' bug similar to the Unix Y2K38 Epochalypse. (NTP has the same problem but introduced Eras to deal with it.)

But in 1983, when the RFC was introduced, it was just a convenient way for a computer on a network to get time from a server with a stable clock (many computers didn't have a real-time clock). It wasn't used for critical services like distributed databases, especially since timing resolution beyond 1 second wasn't that common in computing (assuming you even had a world clock!).

The Daytime protocol (RFC 867) is succinct, but ambiguous. It defines a protocol by which an entire day and timestamp can be returned in human-readable output, for example:

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

The ambiguity comes with the format, which is left to the implementor:

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

Immediately following, it suggests the alternative dd mmm yy hh:mm:ss zzz, which was used for SMTP!

Fun fact: NIST still runs RFC 867/868 Daytime services on time.nist.gov!

$ nc time.nist.gov 13

61281 26-08-29 23:31:43 50 0 0 771.1 UTC(NIST) *

This is using a customized response that matches neither of the RFC formats:

JJJJJ YR-MO-DA HH:MM:SS TT L H msADV UTC(NIST) OTM

Where JJJJJ is the Modified Julian Date, and the OTM is an 'on-time marker', which marks that the time should be correct the moment you receive it... but from my research is more of a 'best guess' that was more useful in older telephone time systems1, which were in some ways more deterministic.

NIST's is definitely one of the stranger time formats I've seen!

The Time and Daytime Protocols were both shepherded by Jon Postel, a.k.a. the 'God of the Internet', known for other hits like SMTP, IANA, and Postel's law.

I often wonder what it was like to be on the ground floor when these protocols and services were written. I was more worried about getting time on my family's Nintendo. Not that my toddler brain could've comprehended network time transfer back then!

Run your own Time and Daytime Server

After taking a nice long detour learning about Time and Daytime, I decided I would add some easter eggs at my booth at VCF Midwest—one of them being Time/Daytime services on ports 37 and 13, respectively.

If you want to run your own Time/Daytime server, it's easy in Linux—they're built into xinetd. These instructions are for Pi OS / Debian, but it's similar on other distros:

# Install and enable xinetd
sudo apt install xinetd
sudo systemctl enable xinetd

# Edit time and daytime configurations
sudo nano /etc/xinetd.d/time
  -> service time tcp set disable to "no"
  -> service time udp set disable to "no"

sudo nano /etc/xinetd.d/daytime
  -> service daytime tcp set disable to "no"
  -> service daytime udp set disable to "no"

# Restart xinetd
sudo systemctl restart xinetd

Make sure ports 37 and 13 are open on your firewall, then from another computer on the network:

# Time
$ nc 10.0.37.60 37 | xxd -g 1
00000000: ee 3f 24 b3                                      .?$.

# Verify the Time value by passing it into `date`:
$ date -r $(( 0xee3f24c8 - 2208988800 ))
Sun Aug 30 16:53:12 CDT 2026

# Daytime
$ nc -v 10.0.37.60 13
Connection to 10.0.37.60 port 13 [tcp/daytime] succeeded!
30 AUG 2026 16:49:26 CDT

The 2208988800 in the date translation command above is the difference (in seconds) between 1900 and 1970, required because UNIX time's epoch is in 1970 (versus 1900 for Time and NTP).

If you'll be at VCF Midwest—especially if you have a vintage computer with Networking attached to the show's network—I can give you a good Time. Or Daytime, for that matter!