I love that two of the universal constants of modern technology is a web address we can ping to get the current time, and a series of automated phone numbers we can call to do the same.
@@MysteriousFuture The speaking clock. In the UK you dial 123 to access it. The number may be different in other countries. If you watch the beginning of the news, it does a live broadcast of the bongs from Big Ben, and you can set your clock to that. That isn't so accurate with digital and satellite broadcasts, but the latency for analogue broadcasts is pretty now.
@@MaximeFelinThis might be charged as an international call, and would cost you a Lot. But if you try dialling “0044123” That should be the UK speaking clock for international users.
I was a relatively new Linux user back in the early 90s. The kernel was at version 0.99, and NTP support was brand new. I was attending a local Unix Users Group, and the guy who'd be talking was just being introduced when it turned 7:00. There were maybe 30 people in the room and at least 25 of them had their digital watches (this was back when digital watches were still thought to be a neat idea) set to beep on the hour. And all of them had their watches synced to their Unix system, as did I. So there was one continuous beep as everyone's watch triggered. Not perfectly synchronized, they didnt all start at the same time, but the late beeps started before the early ceeps finished. So instead of multiple, closely spaced beeps, there was one continuous beep sweeping across the room, lasting perhaps 1.5 seconds.
NTP is great, but it only allows you to sync clocks within a few milliseconds, and that's not precise enough when you want to sync database replicas in a DB that uses timestamps, like Cassandra for example. It's _usually_ fine, but there are better alternatives now and those are used mostly in datacenters. The most well-known is probably Precision Time Protocol (PTP), which gets you to sub-microsecond accuracy. There's also a new system called chrony, which is an implementation of NTP that improves its precision to similar levels to PTP (~70 nanoseconds).
If someone is interested, the main problem with NTP for this is that it assumes that sending and receiving takes the same amount of time, but on the internet data does not always take the same path, and code that marks when the event happened does not always take the same time to execute. PTP increases accuracy by basically putting the time source on the local network, and installing specialized network devices that can capture the delay between the signal for the message arriving and leaving, and allowing each device relaying the message to talk to each other regularly to figure out how long a signal spends traveling between each device.
@@adambahe9309Amen, that’s why we have White Rabbit (a.k.a PTP high accuracy). Gotta get that nanosecond accuracy and picosecond precision if you want to measure time in particle accelerators.
That's partially wrong, i.e. chrony does not provide better accuracy within a well provisioned NTP setup. (Full disclosure: I was a very active member of the NTP Hackers group who maintains the standard, for 25+ years.) Personally I've operated GPS based reference clocks for even longer, on both ipv4 and ipv6, they started out with the Motorola Oncore which provided ~35 ns RMS at a cost of less than 200 USD, plus a few hours with a soldering iron. Years later I was using the SURE evaluation board which did 25 ns at around $80, and which needed far less soldering, just a tiny wire to route the PulsePerSecond signal to the Carrier Detect pin of the DB 9 RS232 port. PTP works by having hw NTP protocol engines in every switch and router, so that it can directly measure how many ns each packet spends inside each box on the route. As long as the cable path is the same in both directions (so giving identical propagation delay), this allows PTP to measure round trip imbalances very accurately. That said, I have personally experienced an ipv6 path between my home in Oslo and a server in South Africa which was totally stable: The time signals I got from that server agreed with my local SURE GPS at the tens of microseconds level, running the stock ntpd deamon on my FreeBSD gateway machine.
I don't know much about American top secret intelligence, but I do know that when journalists have been allowed to interview the folks working in the room that controls American GPS satellites everyone was allowed to skip work if they wanted and every computer screen in the room was locked into a generic screensaver that displayed no information about what it was monitoring. Which would include the aforementioned satellites that have ultra-precise atomic clocks. That's right, _the real atomic time is a national secret._ That's right
Minor correction, the building the NIST clock for NTP is in is actually on their Boulder campus, the Fort Collins clock ensemble operates as the source for radio time (WWVB) and as a backup clock. Many laboratories around the world synchronize their clocks with NIST using common view time transfer which acts like a calibrated GPS time signal.
It's one of those things that just works great, but when it doesn't it manifests bizarrely. In the modern web it's often login issues Client: "Yes I'm logged in, here's my token valid from 09:00" Server: "... but it's only 08:57, buzz off"
It has caused issues in databases before. Imagine the headache in stock trading systems. Nasdaq itself. They're so nervous about latency sensitivity that every Ethernet cable is measured to the correct cm. Everything is standardized and maintained for the economy to run.
I had to implement some time-dependent login stuff, we worked around it by letting the client be a couple minutes off in either direction. (TOTP, basically a pseudo-random number that rotates every 30 seconds; client and server both store the same seed value, but client only sends the number generated from the seed, not the seed itself. So if someone intercepts a generated number, it's harder for them to do any useful cracking with it.)
Oh yes. My mom's portable PC (not a laptop) must have a bad clock battery or something because every time we unplug it and take it somewhere else, suddenly she can't log in (or even connect) to certain websites AT ALL because the system clock reset. Best part was, Firefox is the _only_ browser (installed on that PC) to actually performs a sanity check and notify "hey these timestamps don't add up, can you double-check that your system clock is working properly?" Because system time is something we take for granted so much we barely bother to actually verify it.
Just to be nitpicky: If you're talking about the power grid, a lot of equipment on the grid needs even higher precision. That's why a lot of that equipment is directly attached to a GPS clock and PTP / IEEE1588 is used to propagate even more precise timing information.
After a long night at the bar, a guy invites his friend to see his new apartment. As they enter, the friend notices a large gong against the wall and asks, "What's with the gong?" The guy says, "Oh, that's not a gong, that's my talking clock". He picks up the mallet and hits the gong. From the other side of the wall they both hear, "Shut up! It's 3 in the goddamn morning!"
My dad has a radio clock that adjusts its time based on the radio signal. It's cool to watch it set itself when you first put in the batteries. The hands zoom forward until the time is right.
Time go thru wire, OR time go thru HF radio waves -- WWV is an amazing thing, the ability for devices to get the time via radio pretty much anywhere in North America is very important
i cannot even put into words the emotions i'm feeling over that cardboard pc-case, the idea of bees coming out of a pc case LET ALONE that pulling the entire case away from it's cables X.X my heart hurts!
Let's check -- given the four timestamps at 6:00 ... t0 = client clock, request sent t1 = server clock, request received t2 = server clock, reply sent t3 = client clock, reply received So (t1-t0), also (t3-t2), would indicate the travel time between client and server _if it were measured by the same clock._ Which ... it's not. (t2 - t1) is the time required for the server to receive, calculate, and reply to the request. (t3 - t0) is the total time between the client sending its request and receiving the reply. Thus, (t3 - t0) minus (t2 - t1) represents the total, _round-trip_ travel time between client and server. Dividing this in half gets your average _one-way_ travel time, thus the client can simply set its clock = t2 (server reply time) + (0.5 * (t3-t0) - (t2-t1)) (one-way travel time).
It’s obscure to people outside of systems and infrastructure. 99% of everything we do is “obscure” to everyone else, because it’s so far removed from their everyday lives. But for us, it’s a major part of our identity 😂
Very cool to see this video! For my work I'm implementing a client/server for NTP (called ntpd-rs) as well as a PTP implementation (called statime). The NTP protocol is actually a little more clever than what's being told in this video! NTP can combine the information from multiple time sources, it can do this because time information from one of these servers is generally still a little inaccurate (for a number of reasons). Using a filtering and combination process it can then pick the best source that is currently available. Modern implementations (such as ntpd-rs) even combine the information from multiple sources to get an even more accurate picture of the current time, allowing microsecond precision over the internet. That theoretically at least could make NTP more accurate than PTP (the precision time protocol) if given the same level of hardware support that PTP already has. There is one thing though that shows the age of NTP: it is completely insecure by default, anyone in between you and your time source can easily manipulate the messages being sent, allowing them to change your clock to any time they want. This could have large security implications for protocols such as HTTPS/TLS that secures all web traffic right now and requires knowing the current time to validate if the connection is secure. Let's not think about any high frequency trader or power grid that could possibly use NTP (or PTP) based time over an untrusted network. Luckily we're trying to make progress with NTS, Network Time Security, that allows securely transferring time information, but the protocol is horribly underused and servers are barely available. Hopefully someday we'll be able to make the internet a lot more secure! But I'm afraid an attack using NTP could still happen in the near future, with how important knowing accurate time has become.
I'm not sure I see why man in the middle attacks would be such a hard problem to solve. Couldn't the time servers just use the same encryption that https/ssh/etc. use to prevent that? There's probably a small wrinkle in the encryption and decryption taking a nonzero amount of time to perform which would need to be accounted for, but my intuition also says that that might just bake itself into the request/response delays that are already being accounted for.
Since you collect information from multiple sources anyway, couldn't you just discard the suspiciously off time from that one server anyway? Also, kudos for Rewriting It In Rust:)
@@BinaryDragon NTS actually does use the same encryption as HTTPS, but in a little bit of a different way. The issue we have is that protocols such as SSH and HTTPS are connection based, every packet of information that is sent in these protocols is guaranteed to eventually end up at the other end, which sometimes requires re-sending a lost packet. However for NTP, packets are just individual packets, if one gets lost along the way, we just forget about it, resending it would mean resending the old time information, causing the calculation as shown in the video to be completely wrong and we would set our clock to an old time.
@@pmmeurcatpics That is indeed one way you increase the security of the protocol a little bit, but unfortunately most clients in use today only connect to a single server (which is fine for the accuracy most computers require). The other issue is that someone could just override all messages, from all servers you are sending and receiving time information from. If you manage to do this for more than half the sources of time for a system, then the NTP client doesn't know any better than to accept that half of the servers as the true time.
There are a LOT more stratum 1 servers that this video makes you believe. All ntp server that get their time directly from a GPS receiver, will announce themselves as stratum 1. And a GPS receiver that can do that is < 100 USD (probobably as low as a few bucks but you get the idea). Basically anyone with a crappy PC and crappy GPS receiver can make a stratum 1 server. Stratum only cares about the hierarchy in NTP. There also companies like Meinberg that sell nice boxes that give better accuracy/reliability.
I built my own stratum 1 server with a GPS receiver/antenna and a Raspberry not hard at all. I have nano second accuracy in my home all for less for less than 100 bucks. Fun geeky project.
Yes, you can do it cheap with a SBC and a USB GPS. If you want a more fancy / nerdy setup, you can find Grafana dashboards for GNSS satellite tracking.
There's also Precision Time Protocol (PTP), which is roughly half as old as NTP. It's only really suitable for local networks, but it's able to synchronize clocks to within less than a microsecond. In other words, three to four orders of magnitude better.
I’d like to thank Ben for doing math. I’m a horology geek from Fort Collins who does Internet plumbing all day, but I just tell myself NTP is powered by ancient magick. I hope you win the next individual season of Jetlag.
I wish you'd gone one step further to complete the picture: Your computer gets time from multiple upstream servers, discards obvious outliers, then uses the remainders to calculate the drift of its own clock quite precisely. That drift is used to correct the time your Operating System gets from it's own hardware. So if your computer gets disconnected from the internet it'll still run pretty reliably because NTP modeled how badly your own hardware clock runs and knows how to correct it.
6:00 To be really pedantic: t1 - t0 would be the difference between the clocks *plus the travel time*.(Specifically, it's server time minus client time plus travel time to server.) And t3-t2 is the opposite time difference, plus the return travel time. So, adding these up and the clock difference cancel out, and you get just the round trip travel time: (t1-t0)+(t3-t2). This can be rearranged to give the result you show at 6:20, (t3-t0)-(t2-t1) so this is the total time for the signal to travel between the computers in both directions.
This is assuming that the travel time in each direction was the same which in practice is not always true. In fact network latency can vary from moment to moment. And this is presumably where the error in NTP comes from. But it's a good first order approximation.
The calculation is pretty straightforward, the only downside being that it has to assume the speed of transfer was exactly the same in both directions, but I'm sure the difference is typically negligible (especially since a temporary inconsistency would likely be fixed with the next update).
You can also use a GPS receiver as a VERY accurate clock because every GPS satellite contains multiple atomic clocks and is constantly broadcasting the time. My company uses a NTP server that is connected to a GPS antenna mounted outside the building.
The computer systems I work with require microsecond timing accuracy and we use GPS-disciplined NTP servers. Since they're referenced directly to an atomic clock they're Stratum 1. I can hear WWV on HF pretty well all the time from southern British Columbia. At night WWVB booms in on 60 kHz.
When I mess around with my short-wave radio, I'll usually tune in to WWV. Which, for shortwave, is usually 5MHz. Though, they also have a couple other short-wave frequencies they broadcast on.
@@juri14111996 The systems have been around for a while. At the time GPS was the only option. They work. We have no intention of "fixing" them as long as they do. We looked at GLONASS once for a potential customer whose local authorities required it.
I grew up in Fort Collins. The antenna field associated with WWV is visible from most of the city at night if there’s no trees and almost 30 miles to the south (by my count there’s 11 of those 1,000+ foot towers)
Solid episode! That labelling system never has gotten any better though 😂 The plans seen later in the series that evil Morty steals, are also called "Booger Aids" if I remember correctly 😂
Sadly due to physics, it is impossible to know the _exact_ time at any given moment. Measuring the time inherently introduces entropy, which from a physics standpoint changes how the time is measured. If Rick could somehow get the exact time it would probably have much more profound implications than just the most level possible surface lol
@@BetaDude40 knowing Rick, he would probably get around it by taking the entropy it would make and “double it and give it to the next person” making other people’s clocks produce more entropy or make them less accurate So now there are problems with nobody being on time, GPS is becoming more inaccurate, alien spaceships keep crashing into Earth because their warp systems have to account for space and time So to fix that problem, he “doubles it and gives it to the next person” again except this time he takes all that extra entropy and dumps it into another universe Now another universe has beef with Rick *_AGAIN!_*
thats correct. and if you have the server in the basement, where no gnss signal is available you can use rf over fiber extenders, just need to set the offset correctly.
Was gonna say the same. Stratum 1 servers are surprisingly affordable thanks to GPS. Even reliable ones with rubidium (for holdover when GPS drops out temporarily) are reasonably priced for enthusiasts.
4:36 It's possible to build your own stratum 1 NTP server for like $100 - all you need is a GPS receiver and a cheap computer to plug it into. GPS time broadcasts are accurate to within 3ns.
@@Robert-do3cd I mean, I can't rule out every old cell phone, but I'm pretty sure most cellphone gps modules probably just spit out NMEA ("you are here") to the rest of the hardware. For +/- 3ns precision you need a module that spits out a PPS signal. The module handles most of the hard parts itself.
As someone from Fort Collins, I have to say that I find it very amusing that people in the United States get their time from the time zone that everybody forgets.
Station WWV also broadcasts the time on a Ham radio frequency. When I was a kid I would sometimes tune my dad's radio to their channel because the rhythmic ticking and calming announcer voice helped me get to sleep.
Wow! The first video I have ever seen by HAI that I ACTUALLY knew what they were talking about before I watched the video! And it was pretty spot on! Keep up the good work!
NTP (especially combined with DHCP) is such a beautifully simple system and I wish more devices (like wall clocks, or IoT devices in general) supported it. Like I can buy a wall clock that's PoE, DHCP, and NTP - meaning it doesn't need a battery and simply plugging in a network cable will ensure it's always got the correct time. But it's $200. So many "atomic clocks" rely on the radio frequencies broadcast, which is great until you're until you're in a concrete building on the east coast meaning they never update and are just a regular clock.
Most of the electric utilities use GPS time, since a lot of the protective relays are not connected to the internet by design. You'll have a GPS clock(s) and it sends IRIG signals throughout the substation to all the devices (IEDs) that need to be synced.
There are also a few different programs that you can download to keep your computer clocks more accurate than the factory one. Ham radio operators will use those special programs for some of the software they use for data communication modes because the software used needs to have the most accurate time possible.
I always wondered what happened to the extra time that didn’t fit exactly between 365 .25 rotations per revolution! Thanks for explaining how they fluctuate the length of dec 31, fascinating
Hello from Ft Collins. One of the towers at the radio station was damaged in high winds 3 weeks ago so they're operating with "reduced overall power". I guess that means they're fine.
When I saw the brick thrown through the window I had a moment of hope that this talk of time was a bait & switch and we were getting what we've really been waiting for: a brick video.
Years ago, the radio station I worked at would have to call WWV (the place in Colorado you were talking about) in order to connect to the network News and traffic reports. Bring back memories, I still remember the phone number
I love the reference to the Potato Machine used as Editing Computer - by replacing the CPU by a real Potato. I wonder if that was a slight hint to Sam from his staff
If you want to be super precise about it, there are two issues here: duration of time and current civil time. Duration of time is defined by the SI unit of the second (sometimes in astronomy called the ephemeris second), which is directly defined in terms of the frequency of radiation used to tune atomic clocks (more specifically, cesium clocks). Then 60 seconds are a minute, 60 minutes are an hour, 24 hours are a day, and 7 days are a week. This is in principle a universal definition, and durations can be measured at a single spot in a given reference frame unambiguously. Current civil time is way more confusing. First of all, the idea of having a "current" time implies a universal present. This is achieved by defining an average reference frame of all points on the surface of the earth. This is realized in practice by using a weighted average of all stratum 0 clocks, with the weights determined by how many clocks are in that part of the world and by their reported precision. Some of these are moving faster than others, since rotation causes most rapid movement at the equator, but the average time gives a single coherent reference frame . . . almost. The exact surface is hard to define, so a gravitationally-defined "geoid" is used instead, and the true surface is projected onto that geoid. There is still the problem that some stratum 0 clocks are in orbit and some are on the ground, and the ones in orbit are further from the center of the earth and thus in a flatter region of spacetime. The full definition accounts for the curvature of spacetime due to the earth to define a real actual (somewhat arbitrary) universal frame of reference. Once we have the reference frame, we need to define what the time is in that frame. We do this by establishing an epoch: a particular event in spacetime which can be referenced after the fact. The epoch used here was a particular event at the start of January 1 1958. The idea is that every clock registered 00:00:00 at the same instant on that day, but that's not really the case; however, their offsets were recorded. Thus, we simply use our atomic clocks to count the number of cesium oscillations since then, as converted to the standard reference frame, and that gives the number of seconds since 0:00:00 1 Jan 1958. However, even _that_ is not good enough. This gives the international atomic time, but not the terrestrial time. The problem with this approach is that each day is not in reality exactly 86400 seconds long and each year is not exactly 365 or 366 days long. The astronomical day is defined by the rotation and orbit of the earth, physical phenomena which don't really happen at a constant rate. In particular, the fixed definition of the second was made before we had an accurate measurement of the mean solar day, so it is off by a few parts per million. As a result, atomic time drifts relative to mean solar time in the long term. To correct this drift, leap seconds are added or removed one at a time on June 30 or December 31 on short notice. The rules state that if atomic time drifts from mean solar time by more than 0.9 seconds by one of these dates, a leap second must be inserted or removed to keep them in synch. The result is that the mean solar time (defined by observing the sun) is always within 0.9 seconds of the atomic time. A consequence of adding a leap second is that the civil time can read 11:59:60, and a full civil minute may be either 59 or 61 seconds long. This doesn't affect the definitions for duration of time, which means it's possible for the duration of time that passes between 11:59:00 and 12:01:00 to be not exactly 2 minutes on those days. Moreover, the date drifts with respect to the seasons, because the year is not exactly 365 days long. This is corrected using the same calendar devised way back in 1582 for Pope Gregory. Whenever a year is a multiple of 400, or whenever it is a multiple of 4 but not of 100, then that year is 366 days long instead of 365. This keeps the dates nearly synchronized with the seasons on average over the 400-year cycle, but not quite. However, this difference won't be noticeable to most people for tens of thousands of years. Finally, we add the window dressing of time zones. Everything I have described so far is UTC, but the civil time in a given jurisdiction may be offset from UTC. That is decided by statute, so it changes frequently. Some regions are in different time zones depending on the season. But any given time zone can be identified by adding or subtracting a stated number of hours and minutes from UTC. Although this is the easiest to define physically, it is the hardest to track in practice, because every jurisdiction sets its own rules, changing them sometimes with little notice.
6:13 -- It looks like the first term, (t3-t0), is the total round-trip time of the query to the Stratum 3 (S3) server. The second term, (t2-t1), is the processing time of the Stratum 3 server. So the difference would be the round-trip query time, minus the S3 processing time, giving you 2*(one-way signal delay). Divide by 2 and you have the average signal delay between your computer and the S3 server. (The average is between the one-way outgoing and one-way incoming legs of the full round-trip query). Hope this helps!
Sam, one additional thing to consider about the importance of time that was a little overlooked is: GPS and the fact that the 21st Century trading economy literally relies on GPS providing accurate time for ships at sea. Precision Navigation and Time is actually a key strategic concern for most nations that is wildly underestimated by the non-mariner public.
"Since you can't really make your own stratum 1 server without direct access to an atomic clock" This is easier than you may realize. I've been running my own stratum 1 timeserver for years, using a Raspberry Pi and a GPS module that outputs a 1PPS discipline signal.
I feel really bad, but my first thought was "how hard it would be for a group of hackers to attack this seemingly underfunded and overlooked part of the internet" the ability of HAI to show up with insights into obscure logistic and civil engineering wonderworlds, and then showing how frail and vulnerable they are, can be quite scary. Im so happy HAI arent evil
My father was an Air Force Chaplain. Due to the tight timing of multiple Sunday morning services he felt it necessary to have his watch set to the correct time. This being the 1950s and Al Gore had no yet invented the internet my job early Sunday morning was to tune his shortwave radio to the National Bureau of Standards and listen to the time tone Then set his watch.
My brothers and I for years set our watches to WWV in the 70s and 80s. I'm the 90s I ran Unix servers connected only by dialup, so I ran a script that would dial a NIST number once a week to correct server times in 4 different states. Nowadays it's so much easier, getting down really to which NTP daemon you prefer, with time sync also built in to server and workstation management architecture. Still, it's cool to tune in to WWV.
And for those that can afford it there’s PTP (Precision Time Protocol) which can get you a few tens of nanoseconds from a reference clock. EDIT: You can relatively easily make a Stratum 1 NTP server with a GPS receiver board and a Raspberry Pi mini computer. Cost is about 200-300 USD total for hardware (software is all free).
unless I'm misunderstanding something, t1 - t0 is the time it takes for the message to travel between the two computers plus the possible time difference, not just the difference between their clocks, so the explanation is wrong from 6:02 . According to wikipedia, the correct formula for the clock difference is (t1-t0 + t2-t3)/2. This is because t1-t0 and t2-t3 both contain the message travel time but with opposite signs(if we assume that it takes the same time going both ways), so adding them together will cancel that and we are only left with two times the clock difference.
Exactly, they got it wrong. Had to scroll a while to find this, thank you! Surprising that not more viewers noticed, with only 2 timestamps it's impossible to separate the clock offset from network latency.
Another incredibly interesting system is the one the kept clocks in sync before we had computers in our homes. The clocks are even super simple an dumb ac motors with simple gearboxes to drive the clock hands. They two are connected through a distributed time system called ... the power grid. The power to our house contains a clock that "ticks" 60 times each second (at least in the USA) and though that is not perfectly accurate, the power system keeps track on how many "ticks" it has sent and updates the rate to make sure at the end of the day, it has distributed exactly 24hx60mx60sx60 "ticks" each day so all our clocks can be the same.
1:04 I wonder if they just had an Aorus Elite Z390 board sitting around, or bought it for this gag. Seems like a weirdly expensive choice for a *throwaway* joke (badumtss)...
WWV (USA) and CHU (Canada) have been doing their time broadcasting for decades. They were on the air when I got my ham radio license back in the early 1960's. WWV is a time and frequency standard.
Hats off to David Mills, NTP inventor and maintainer for close to 40 years, who passed away in January of this year.
Must read: "A Brief History of NTP Time: Confessions of an Internet Timekeeper " by Mills.
@@AlanTheBeast100it’s about time I read this
I guess it was his.... time to go.
Was his passing untimely?
Rest In Peace.😢
I love that two of the universal constants of modern technology is a web address we can ping to get the current time, and a series of automated phone numbers we can call to do the same.
What’s the phone number to time service 😂😂😂
@@MysteriousFuture The speaking clock. In the UK you dial 123 to access it. The number may be different in other countries.
If you watch the beginning of the news, it does a live broadcast of the bongs from Big Ben, and you can set your clock to that. That isn't so accurate with digital and satellite broadcasts, but the latency for analogue broadcasts is pretty now.
What country are you for this service where I am the only time provider by phone stopped operating one year ago.
@@MaximeFelinThis might be charged as an international call, and would cost you a Lot. But if you try dialling “0044123” That should be the UK speaking clock for international users.
Everyone uses their smart phone time as actual time as it’s the most
I was a relatively new Linux user back in the early 90s. The kernel was at version 0.99, and NTP support was brand new.
I was attending a local Unix Users Group, and the guy who'd be talking was just being introduced when it turned 7:00.
There were maybe 30 people in the room and at least 25 of them had their digital watches (this was back when digital watches were still thought to be a neat idea) set to beep on the hour. And all of them had their watches synced to their Unix system, as did I.
So there was one continuous beep as everyone's watch triggered. Not perfectly synchronized, they didnt all start at the same time, but the late beeps started before the early ceeps finished. So instead of multiple, closely spaced beeps, there was one continuous beep sweeping across the room, lasting perhaps 1.5 seconds.
Was that comment about digital watches intended to be a subtle nod to the Hitchhiker’s Guide to the Galaxy? If so, well done.
6:29 Ben went to college and wrote in the script…
Description: written by Amy
Now that’s hilarious
I suspect Ben also edits basically everything... ;)
I wonder if they both were involved in the script
They are taking Amy's credit
Yeah! Let Ben do JetLag!
I like to guess who wrote HAI episodes and I had pegged this as a Ben episode before this...this made me SURE...I was surprised!
NTP is great, but it only allows you to sync clocks within a few milliseconds, and that's not precise enough when you want to sync database replicas in a DB that uses timestamps, like Cassandra for example. It's _usually_ fine, but there are better alternatives now and those are used mostly in datacenters. The most well-known is probably Precision Time Protocol (PTP), which gets you to sub-microsecond accuracy. There's also a new system called chrony, which is an implementation of NTP that improves its precision to similar levels to PTP (~70 nanoseconds).
If someone is interested, the main problem with NTP for this is that it assumes that sending and receiving takes the same amount of time, but on the internet data does not always take the same path, and code that marks when the event happened does not always take the same time to execute.
PTP increases accuracy by basically putting the time source on the local network, and installing specialized network devices that can capture the delay between the signal for the message arriving and leaving, and allowing each device relaying the message to talk to each other regularly to figure out how long a signal spends traveling between each device.
@@thebaker8637I am interested and this is awesome, thank you.
PTP is for boomers. All the cool kids have sub nanosecond clock accuracy.
@@adambahe9309Amen, that’s why we have White Rabbit (a.k.a PTP high accuracy). Gotta get that nanosecond accuracy and picosecond precision if you want to measure time in particle accelerators.
That's partially wrong, i.e. chrony does not provide better accuracy within a well provisioned NTP setup. (Full disclosure: I was a very active member of the NTP Hackers group who maintains the standard, for 25+ years.)
Personally I've operated GPS based reference clocks for even longer, on both ipv4 and ipv6, they started out with the Motorola Oncore which provided ~35 ns RMS at a cost of less than 200 USD, plus a few hours with a soldering iron. Years later I was using the SURE evaluation board which did 25 ns at around $80, and which needed far less soldering, just a tiny wire to route the PulsePerSecond signal to the Carrier Detect pin of the DB 9 RS232 port.
PTP works by having hw NTP protocol engines in every switch and router, so that it can directly measure how many ns each packet spends inside each box on the route. As long as the cable path is the same in both directions (so giving identical propagation delay), this allows PTP to measure round trip imbalances very accurately.
That said, I have personally experienced an ipv6 path between my home in Oslo and a server in South Africa which was totally stable: The time signals I got from that server agreed with my local SURE GPS at the tens of microseconds level, running the stock ntpd deamon on my FreeBSD gateway machine.
0:23 this is a video about bricks
inner peace
I don't know much about American top secret intelligence, but I do know that when journalists have been allowed to interview the folks working in the room that controls American GPS satellites everyone was allowed to skip work if they wanted and every computer screen in the room was locked into a generic screensaver that displayed no information about what it was monitoring. Which would include the aforementioned satellites that have ultra-precise atomic clocks.
That's right, _the real atomic time is a national secret._
That's right
1:03 no, it's a potato
Minor correction, the building the NIST clock for NTP is in is actually on their Boulder campus, the Fort Collins clock ensemble operates as the source for radio time (WWVB) and as a backup clock. Many laboratories around the world synchronize their clocks with NIST using common view time transfer which acts like a calibrated GPS time signal.
It's one of those things that just works great, but when it doesn't it manifests bizarrely. In the modern web it's often login issues
Client: "Yes I'm logged in, here's my token valid from 09:00"
Server: "... but it's only 08:57, buzz off"
It has caused issues in databases before. Imagine the headache in stock trading systems. Nasdaq itself. They're so nervous about latency sensitivity that every Ethernet cable is measured to the correct cm. Everything is standardized and maintained for the economy to run.
I had to implement some time-dependent login stuff, we worked around it by letting the client be a couple minutes off in either direction. (TOTP, basically a pseudo-random number that rotates every 30 seconds; client and server both store the same seed value, but client only sends the number generated from the seed, not the seed itself. So if someone intercepts a generated number, it's harder for them to do any useful cracking with it.)
Oh yes. My mom's portable PC (not a laptop) must have a bad clock battery or something because every time we unplug it and take it somewhere else, suddenly she can't log in (or even connect) to certain websites AT ALL because the system clock reset.
Best part was, Firefox is the _only_ browser (installed on that PC) to actually performs a sanity check and notify "hey these timestamps don't add up, can you double-check that your system clock is working properly?" Because system time is something we take for granted so much we barely bother to actually verify it.
@@yensteel”economy”
@@emurphy42 I'm convinced Windows syncs about once per century, I was having issues and found out I was about 20 seconds out.
Just to be nitpicky: If you're talking about the power grid, a lot of equipment on the grid needs even higher precision. That's why a lot of that equipment is directly attached to a GPS clock and PTP / IEEE1588 is used to propagate even more precise timing information.
After a long night at the bar, a guy invites his friend to see his new apartment.
As they enter, the friend notices a large gong against the wall and asks, "What's with the gong?"
The guy says, "Oh, that's not a gong, that's my talking clock". He picks up the mallet and hits the gong.
From the other side of the wall they both hear, "Shut up! It's 3 in the goddamn morning!"
For people who dont know founder of ntp, David Mills, died in january of this year at the age of 85. RIP
There's an old regularity rally saying: A man with one clock knows what time it is. A man with two clocks is never sure.
RIP Dr. David L. Mills (1938-2024)
My dad has a radio clock that adjusts its time based on the radio signal. It's cool to watch it set itself when you first put in the batteries. The hands zoom forward until the time is right.
Time go thru wire, OR time go thru HF radio waves -- WWV is an amazing thing, the ability for devices to get the time via radio pretty much anywhere in North America is very important
Give me GPS 1 PPS.
@@AlanTheBeast100Time go through vacuum!
Time go through wireless 📻🕰
@@pseudotasuki Too suffocating.
The modern world is built on insane and incredibly passionate nerds.
I like that this HAI has a higher proportion of actual footage shot by the team, versus stock footage. Keep it up folks!!
I noticed that too! Came to the comments specifically to see if anyone else had noticed lol
Wait till this man hears about PTP (Precision Time Protocol)
I work with gPTP and it’s got so many Tansparent Boundaries
And then WhiteRabbit by CERN
i cannot even put into words the emotions i'm feeling over that cardboard pc-case, the idea of bees coming out of a pc case LET ALONE that pulling the entire case away from it's cables X.X
my heart hurts!
Did you not notice the potato battery it's connected to?
Too many things these days are filled with bees.
@@wanwastrel I wish more farms were filled with bees instead of houses filled with bees
Lol Sam complaining about Ben at the end
The Metz Bar-le-Duc drama is still deep in his bones
What makes it even better is that the description says the script was written by world-famous outside correspondent Amy.
@@macvanavermaetor Merlischachen
The nintendo ds as shown in the video, does not use network time. They are manually set. They do not even adjust for daylight savings
So does my Sony A7IV camera so I have to check the time on it every once in awhile to ensure accurate time
Oh yeah, I just moved to another state, thanks for reminding me to change mine's time zone
I love the attention to detail with the computer time, good job editors
Let's check -- given the four timestamps at 6:00 ...
t0 = client clock, request sent
t1 = server clock, request received
t2 = server clock, reply sent
t3 = client clock, reply received
So (t1-t0), also (t3-t2), would indicate the travel time between client and server _if it were measured by the same clock._ Which ... it's not.
(t2 - t1) is the time required for the server to receive, calculate, and reply to the request.
(t3 - t0) is the total time between the client sending its request and receiving the reply.
Thus, (t3 - t0) minus (t2 - t1) represents the total, _round-trip_ travel time between client and server. Dividing this in half gets your average _one-way_ travel time, thus the client can simply set its clock = t2 (server reply time) + (0.5 * (t3-t0) - (t2-t1)) (one-way travel time).
I wouldn't really call NTP obscure, but then again I'm a network admin, so....
Same. I saw the title and was like "Finally some mainstream stuff!" haha
he called NIST obscure as well so.....
It’s obscure to people outside of systems and infrastructure. 99% of everything we do is “obscure” to everyone else, because it’s so far removed from their everyday lives. But for us, it’s a major part of our identity 😂
XKCD 2501 in full effect here
Of protocols every layman knows, ntp is one of the least obscure
Perfect timing, I’m eating rn
Same
His timing must have been synced using the Network Time Protocol
Same
I am shitting on company time
What ya boys eating?
Very cool to see this video! For my work I'm implementing a client/server for NTP (called ntpd-rs) as well as a PTP implementation (called statime). The NTP protocol is actually a little more clever than what's being told in this video! NTP can combine the information from multiple time sources, it can do this because time information from one of these servers is generally still a little inaccurate (for a number of reasons). Using a filtering and combination process it can then pick the best source that is currently available. Modern implementations (such as ntpd-rs) even combine the information from multiple sources to get an even more accurate picture of the current time, allowing microsecond precision over the internet. That theoretically at least could make NTP more accurate than PTP (the precision time protocol) if given the same level of hardware support that PTP already has.
There is one thing though that shows the age of NTP: it is completely insecure by default, anyone in between you and your time source can easily manipulate the messages being sent, allowing them to change your clock to any time they want. This could have large security implications for protocols such as HTTPS/TLS that secures all web traffic right now and requires knowing the current time to validate if the connection is secure. Let's not think about any high frequency trader or power grid that could possibly use NTP (or PTP) based time over an untrusted network. Luckily we're trying to make progress with NTS, Network Time Security, that allows securely transferring time information, but the protocol is horribly underused and servers are barely available. Hopefully someday we'll be able to make the internet a lot more secure! But I'm afraid an attack using NTP could still happen in the near future, with how important knowing accurate time has become.
I'm not sure I see why man in the middle attacks would be such a hard problem to solve. Couldn't the time servers just use the same encryption that https/ssh/etc. use to prevent that? There's probably a small wrinkle in the encryption and decryption taking a nonzero amount of time to perform which would need to be accounted for, but my intuition also says that that might just bake itself into the request/response delays that are already being accounted for.
@@BinaryDragonI'd imagine this is more or less what NTS is - the problem is no one does this, i.e. doesn't use NTS.
Since you collect information from multiple sources anyway, couldn't you just discard the suspiciously off time from that one server anyway? Also, kudos for Rewriting It In Rust:)
@@BinaryDragon NTS actually does use the same encryption as HTTPS, but in a little bit of a different way. The issue we have is that protocols such as SSH and HTTPS are connection based, every packet of information that is sent in these protocols is guaranteed to eventually end up at the other end, which sometimes requires re-sending a lost packet. However for NTP, packets are just individual packets, if one gets lost along the way, we just forget about it, resending it would mean resending the old time information, causing the calculation as shown in the video to be completely wrong and we would set our clock to an old time.
@@pmmeurcatpics That is indeed one way you increase the security of the protocol a little bit, but unfortunately most clients in use today only connect to a single server (which is fine for the accuracy most computers require). The other issue is that someone could just override all messages, from all servers you are sending and receiving time information from. If you manage to do this for more than half the sources of time for a system, then the NTP client doesn't know any better than to accept that half of the servers as the true time.
Imagine that job. “I maintain clocks, I’m paid $300,000, and it’s worth every penny for the government to pay me that.”
Finally a video i can show instead of explaining this to engineers - no your stratum 7 clock is not accurate :(
Depends on the definition of "engineer". eg: if he's a "Microsoft Certified engineer" then he's probably not an engineer to begin with.
@AlanTheBeast100 and if he's the person who "engineered" the Chevy Cavalier, he's actually Satan.
@@AlanTheBeast100 I first read that as "Minecraft Certified," which to be honest would probably demonstrate at least as much competence.
@@WyvernYT Good point.
Hi Sam!
Thanks to Amy for building and operating her own time machine to get to the bottom of this problem. You should give her a raise!
lol I love how they put a motherboard in a cardboard box full of bees for a bit
Screams in Nicholas Cage
Maybe I'm reading it wrong, but the wording suggests you didn't realize they weren't real bees?
strange approach. i would think they had just put the bees in a box containing a motherboard but hey, the more you know
WITH A POTATO CPU
@@omarqataberi I was expecting the potato to be the power supply.
There are a LOT more stratum 1 servers that this video makes you believe. All ntp server that get their time directly from a GPS receiver, will announce themselves as stratum 1. And a GPS receiver that can do that is < 100 USD (probobably as low as a few bucks but you get the idea). Basically anyone with a crappy PC and crappy GPS receiver can make a stratum 1 server. Stratum only cares about the hierarchy in NTP. There also companies like Meinberg that sell nice boxes that give better accuracy/reliability.
I built my own stratum 1 server with a GPS receiver/antenna and a Raspberry not hard at all. I have nano second accuracy in my home all for less for less than 100 bucks. Fun geeky project.
Came here to say the exact same thing - I’ve got 4 GPS based clocks at work as well as one at home for tinkering.
tecnicaly every smartphone is a stratum 1 server, because it can get time from gsp, same with most cars.
Yes, you can do it cheap with a SBC and a USB GPS. If you want a more fancy / nerdy setup, you can find Grafana dashboards for GNSS satellite tracking.
Can't believe I watch all of this only to learn that time go through wire
There's also Precision Time Protocol (PTP), which is roughly half as old as NTP. It's only really suitable for local networks, but it's able to synchronize clocks to within less than a microsecond. In other words, three to four orders of magnitude better.
I’d like to thank Ben for doing math. I’m a horology geek from Fort Collins who does Internet plumbing all day, but I just tell myself NTP is powered by ancient magick. I hope you win the next individual season of Jetlag.
I wish you'd gone one step further to complete the picture: Your computer gets time from multiple upstream servers, discards obvious outliers, then uses the remainders to calculate the drift of its own clock quite precisely. That drift is used to correct the time your Operating System gets from it's own hardware. So if your computer gets disconnected from the internet it'll still run pretty reliably because NTP modeled how badly your own hardware clock runs and knows how to correct it.
Oh boy! I cant wait for another video including a lot of numbers in it!
Not a sarcasms, i honestly enjoy it.
6:00 To be really pedantic: t1 - t0 would be the difference between the clocks *plus the travel time*.(Specifically, it's server time minus client time plus travel time to server.) And t3-t2 is the opposite time difference, plus the return travel time. So, adding these up and the clock difference cancel out, and you get just the round trip travel time: (t1-t0)+(t3-t2). This can be rearranged to give the result you show at 6:20, (t3-t0)-(t2-t1) so this is the total time for the signal to travel between the computers in both directions.
This is assuming that the travel time in each direction was the same which in practice is not always true. In fact network latency can vary from moment to moment. And this is presumably where the error in NTP comes from. But it's a good first order approximation.
The calculation is pretty straightforward, the only downside being that it has to assume the speed of transfer was exactly the same in both directions, but I'm sure the difference is typically negligible (especially since a temporary inconsistency would likely be fixed with the next update).
You can also use a GPS receiver as a VERY accurate clock because every GPS satellite contains multiple atomic clocks and is constantly broadcasting the time. My company uses a NTP server that is connected to a GPS antenna mounted outside the building.
The computer systems I work with require microsecond timing accuracy and we use GPS-disciplined NTP servers. Since they're referenced directly to an atomic clock they're Stratum 1.
I can hear WWV on HF pretty well all the time from southern British Columbia. At night WWVB booms in on 60 kHz.
When I mess around with my short-wave radio, I'll usually tune in to WWV. Which, for shortwave, is usually 5MHz. Though, they also have a couple other short-wave frequencies they broadcast on.
only gps? the server i worked with uses multiple gnss system (gps, galileo, gloans)
@@juri14111996 The systems have been around for a while. At the time GPS was the only option. They work. We have no intention of "fixing" them as long as they do.
We looked at GLONASS once for a potential customer whose local authorities required it.
No PTP/WhiteRabbit for nano/picosecond precision?
@@juri14111996No BeiDou (BDS), it is a security risk!
I grew up in Fort Collins. The antenna field associated with WWV is visible from most of the city at night if there’s no trees and almost 30 miles to the south (by my count there’s 11 of those 1,000+ foot towers)
Time only knows what Time it is by knowing what Time it isn't
I feel like knowing what the true time is, is the same feeling as morty feeling something perfectly flat for the first time.
That little irritation you get when looking at a clock that you set is now a little bit off?
Imagine seeing that EVERYWHERE!
Solid episode!
That labelling system never has gotten any better though 😂
The plans seen later in the series that evil Morty steals, are also called "Booger Aids" if I remember correctly 😂
Sadly due to physics, it is impossible to know the _exact_ time at any given moment. Measuring the time inherently introduces entropy, which from a physics standpoint changes how the time is measured. If Rick could somehow get the exact time it would probably have much more profound implications than just the most level possible surface lol
@@BetaDude40 knowing Rick, he would probably get around it by taking the entropy it would make and “double it and give it to the next person” making other people’s clocks produce more entropy or make them less accurate
So now there are problems with nobody being on time, GPS is becoming more inaccurate, alien spaceships keep crashing into Earth because their warp systems have to account for space and time
So to fix that problem, he “doubles it and gives it to the next person” again except this time he takes all that extra entropy and dumps it into another universe
Now another universe has beef with Rick *_AGAIN!_*
@@Abdega Damn, Justin Roiland should hit you up for a writing gig…
"Which you are, since that's the only country" and now I have coffee all over my keyboard... :)
Computers that receive their clock via GPS are considered Stratum-1 NTP servers.
I have a Raspberry Pi with a GPS hat that is a stratum-1 NTP server.
thats correct. and if you have the server in the basement, where no gnss signal is available you can use rf over fiber extenders, just need to set the offset correctly.
The problem with GPS is that relativity comes into play and they drift quite a bit because of that. That's why they have to re-sync them constantly
Was gonna say the same. Stratum 1 servers are surprisingly affordable thanks to GPS. Even reliable ones with rubidium (for holdover when GPS drops out temporarily) are reasonably priced for enthusiasts.
Same here 🤣
4:36
It's possible to build your own stratum 1 NTP server for like $100 - all you need is a GPS receiver and a cheap computer to plug it into.
GPS time broadcasts are accurate to within 3ns.
Can you do it with an old cell phone and an app?
@@Robert-do3cd I mean, I can't rule out every old cell phone, but I'm pretty sure most cellphone gps modules probably just spit out NMEA ("you are here") to the rest of the hardware. For +/- 3ns precision you need a module that spits out a PPS signal. The module handles most of the hard parts itself.
At 3:40, the clock denoting the start of each minute precisely is 2 seconds off because it shows the time as 21:04:02 instead of 21:04:00
As someone from Fort Collins, I have to say that I find it very amusing that people in the United States get their time from the time zone that everybody forgets.
Station WWV also broadcasts the time on a Ham radio frequency. When I was a kid I would sometimes tune my dad's radio to their channel because the rhythmic ticking and calming announcer voice helped me get to sleep.
Wow! The first video I have ever seen by HAI that I ACTUALLY knew what they were talking about before I watched the video! And it was pretty spot on! Keep up the good work!
Anyone who works in a Stratham zero facility, gets to call themselves, a time lord.
I love that the motherboard in the box of bees has a potato attached.
6:52 "You're paying too much for coffee"
Joke's on you. I don't pay for coffee (I don't like coffee. Lol)
"you shall not tempt me with your dirty bean water, coffee man!"
NTP (especially combined with DHCP) is such a beautifully simple system and I wish more devices (like wall clocks, or IoT devices in general) supported it. Like I can buy a wall clock that's PoE, DHCP, and NTP - meaning it doesn't need a battery and simply plugging in a network cable will ensure it's always got the correct time. But it's $200.
So many "atomic clocks" rely on the radio frequencies broadcast, which is great until you're until you're in a concrete building on the east coast meaning they never update and are just a regular clock.
I know some of the guys who work on clocks at NPL in the UK. HAI's description of them and what they do is absolutely bang on.
Most of the electric utilities use GPS time, since a lot of the protective relays are not connected to the internet by design. You'll have a GPS clock(s) and it sends IRIG signals throughout the substation to all the devices (IEDs) that need to be synced.
I trust those “3 guys in a room who REALLY care about X” agencies more than I trust the any branch of the military (except the coast guard)
If you can read this, thank a teacher. If it’s in English, thank a military member.
There are also a few different programs that you can download to keep your computer clocks more accurate than the factory one. Ham radio operators will use those special programs for some of the software they use for data communication modes because the software used needs to have the most accurate time possible.
I always wondered what happened to the extra time that didn’t fit exactly between 365 .25 rotations per revolution! Thanks for explaining how they fluctuate the length of dec 31, fascinating
Just wanted to say these videos keep getting better and better. Great job Sam and team! ❤
Woooow being called a nerd by HAI editors when looking into a QR code Easter egg hits different
I grew up on the nation time signal in Canada. 11:00 am on the CBC, love that long beep.
I occasionally take things very literal. Here, I imagined a little boy in Canada growing slightly bigger everytime the CBC played a beep at 11AM.
The gag starting at 0:57 is the hardest I think I've ever laughed at an HaI video
I feel like someone at HAI watches a lot of LTT videos. They've done a lot of gags like this in their intros lately.
Chicago: Does anybody really know what time it is?
HAI: well actually…
“Does anybody know what time it is” would have been a PERFECT Chicago pun. 🎶
Hello from Ft Collins. One of the towers at the radio station was damaged in high winds 3 weeks ago so they're operating with "reduced overall power". I guess that means they're fine.
Watching while my Casio radio connects to Ft. Collins to keep me atomically accurate!
0:24 wonderful transition
I have several watches that receive the Ft. Collins AN radio signal directly at least once a day.
When I saw the brick thrown through the window I had a moment of hope that this talk of time was a bait & switch and we were getting what we've really been waiting for: a brick video.
Years ago, the radio station I worked at would have to call WWV (the place in Colorado you were talking about) in order to connect to the network News and traffic reports. Bring back memories, I still remember the phone number
Half as Interesting: “you’re paying too much for coffee”
Me, who doesn’t drink coffee: “say what now?!?”
I love the reference to the Potato Machine used as Editing Computer - by replacing the CPU by a real Potato. I wonder if that was a slight hint to Sam from his staff
5:28 "Does anybody really know what time it is? Does anybody really care?" - Chicago
Fort Collins mentioned, hell yeah
@1:02 How are you doing? Because I'm a potato.
I love the cardbord box around the PC^^
I love it when my town and state pop up in HAI videos
If you want to be super precise about it, there are two issues here: duration of time and current civil time. Duration of time is defined by the SI unit of the second (sometimes in astronomy called the ephemeris second), which is directly defined in terms of the frequency of radiation used to tune atomic clocks (more specifically, cesium clocks). Then 60 seconds are a minute, 60 minutes are an hour, 24 hours are a day, and 7 days are a week. This is in principle a universal definition, and durations can be measured at a single spot in a given reference frame unambiguously.
Current civil time is way more confusing. First of all, the idea of having a "current" time implies a universal present. This is achieved by defining an average reference frame of all points on the surface of the earth. This is realized in practice by using a weighted average of all stratum 0 clocks, with the weights determined by how many clocks are in that part of the world and by their reported precision. Some of these are moving faster than others, since rotation causes most rapid movement at the equator, but the average time gives a single coherent reference frame . . . almost. The exact surface is hard to define, so a gravitationally-defined "geoid" is used instead, and the true surface is projected onto that geoid. There is still the problem that some stratum 0 clocks are in orbit and some are on the ground, and the ones in orbit are further from the center of the earth and thus in a flatter region of spacetime. The full definition accounts for the curvature of spacetime due to the earth to define a real actual (somewhat arbitrary) universal frame of reference.
Once we have the reference frame, we need to define what the time is in that frame. We do this by establishing an epoch: a particular event in spacetime which can be referenced after the fact. The epoch used here was a particular event at the start of January 1 1958. The idea is that every clock registered 00:00:00 at the same instant on that day, but that's not really the case; however, their offsets were recorded. Thus, we simply use our atomic clocks to count the number of cesium oscillations since then, as converted to the standard reference frame, and that gives the number of seconds since 0:00:00 1 Jan 1958.
However, even _that_ is not good enough. This gives the international atomic time, but not the terrestrial time. The problem with this approach is that each day is not in reality exactly 86400 seconds long and each year is not exactly 365 or 366 days long. The astronomical day is defined by the rotation and orbit of the earth, physical phenomena which don't really happen at a constant rate. In particular, the fixed definition of the second was made before we had an accurate measurement of the mean solar day, so it is off by a few parts per million. As a result, atomic time drifts relative to mean solar time in the long term. To correct this drift, leap seconds are added or removed one at a time on June 30 or December 31 on short notice. The rules state that if atomic time drifts from mean solar time by more than 0.9 seconds by one of these dates, a leap second must be inserted or removed to keep them in synch. The result is that the mean solar time (defined by observing the sun) is always within 0.9 seconds of the atomic time. A consequence of adding a leap second is that the civil time can read 11:59:60, and a full civil minute may be either 59 or 61 seconds long. This doesn't affect the definitions for duration of time, which means it's possible for the duration of time that passes between 11:59:00 and 12:01:00 to be not exactly 2 minutes on those days.
Moreover, the date drifts with respect to the seasons, because the year is not exactly 365 days long. This is corrected using the same calendar devised way back in 1582 for Pope Gregory. Whenever a year is a multiple of 400, or whenever it is a multiple of 4 but not of 100, then that year is 366 days long instead of 365. This keeps the dates nearly synchronized with the seasons on average over the 400-year cycle, but not quite. However, this difference won't be noticeable to most people for tens of thousands of years.
Finally, we add the window dressing of time zones. Everything I have described so far is UTC, but the civil time in a given jurisdiction may be offset from UTC. That is decided by statute, so it changes frequently. Some regions are in different time zones depending on the season. But any given time zone can be identified by adding or subtracting a stated number of hours and minutes from UTC. Although this is the easiest to define physically, it is the hardest to track in practice, because every jurisdiction sets its own rules, changing them sometimes with little notice.
6:13 -- It looks like the first term, (t3-t0), is the total round-trip time of the query to the Stratum 3 (S3) server. The second term, (t2-t1), is the processing time of the Stratum 3 server. So the difference would be the round-trip query time, minus the S3 processing time, giving you 2*(one-way signal delay). Divide by 2 and you have the average signal delay between your computer and the S3 server. (The average is between the one-way outgoing and one-way incoming legs of the full round-trip query). Hope this helps!
Sam, one additional thing to consider about the importance of time that was a little overlooked is: GPS and the fact that the 21st Century trading economy literally relies on GPS providing accurate time for ships at sea. Precision Navigation and Time is actually a key strategic concern for most nations that is wildly underestimated by the non-mariner public.
i mean my computer claims it has been 3:17pm for 5 hours now.
"Since you can't really make your own stratum 1 server without direct access to an atomic clock"
This is easier than you may realize. I've been running my own stratum 1 timeserver for years, using a Raspberry Pi and a GPS module that outputs a 1PPS discipline signal.
There's a Jeff Geerling video about it that explains this. Worth a watch for those interested
Specs of the editing machine:
CPU - 8g Protein
RAM - 66g Carbs
GPU - 1g Fat
Sam’s computer is literally a potato 🥔 filled with bees 🐝 💀
I feel really bad, but my first thought was "how hard it would be for a group of hackers to attack this seemingly underfunded and overlooked part of the internet" the ability of HAI to show up with insights into obscure logistic and civil engineering wonderworlds, and then showing how frail and vulnerable they are, can be quite scary. Im so happy HAI arent evil
My father was an Air Force Chaplain. Due to the tight timing of multiple Sunday morning services he felt it necessary to have his watch set to the correct time. This being the 1950s and Al Gore had no yet invented the internet my job early Sunday morning was to tune his shortwave radio to the National Bureau of Standards and listen to the time tone Then set his watch.
0:15 Wrong. For some reason my Laptop clock is going like 5 minutes wrong 🤣
go into settings, turn off auto sync, and sync the time manually. auto sync is broken on some windows 10 computers.
@@frogtank4407 hm I'll try that out
@@frogtank4407 Or, from an administrator command pompt, do
W32tm /resync /force
My brothers and I for years set our watches to WWV in the 70s and 80s. I'm the 90s I ran Unix servers connected only by dialup, so I ran a script that would dial a NIST number once a week to correct server times in 4 different states.
Nowadays it's so much easier, getting down really to which NTP daemon you prefer, with time sync also built in to server and workstation management architecture. Still, it's cool to tune in to WWV.
And for those that can afford it there’s PTP (Precision Time Protocol) which can get you a few tens of nanoseconds from a reference clock.
EDIT: You can relatively easily make a Stratum 1 NTP server with a GPS receiver board and a Raspberry Pi mini computer. Cost is about 200-300 USD total for hardware (software is all free).
unless I'm misunderstanding something, t1 - t0 is the time it takes for the message to travel between the two computers plus the possible time difference, not just the difference between their clocks, so the explanation is wrong from 6:02 .
According to wikipedia, the correct formula for the clock difference is (t1-t0 + t2-t3)/2. This is because t1-t0 and t2-t3 both contain the message travel time but with opposite signs(if we assume that it takes the same time going both ways), so adding them together will cancel that and we are only left with two times the clock difference.
Exactly, they got it wrong. Had to scroll a while to find this, thank you! Surprising that not more viewers noticed, with only 2 timestamps it's impossible to separate the clock offset from network latency.
As a Signals Technician... yeah, that's actually quite a good explanation.
Well done!
FoCo mentioned! Woot!
I still have a lot of clocks in my house which must be manually set, enough where adjusting for Daylight Saving Time is always a chore.
There is only one S in Daylight Saving Time.
I'm so close, it's just my microwave now. I now have an oven that my phone can sync the time to over wifi lol.
@@PetesGuide *Daylight aving Time.
@@steve470 Doh! Fixed.
Nah, there's actually a REALLY Small Gnome in my Laptop, he is very talented
Another incredibly interesting system is the one the kept clocks in sync before we had computers in our homes. The clocks are even super simple an dumb ac motors with simple gearboxes to drive the clock hands. They two are connected through a distributed time system called ... the power grid. The power to our house contains a clock that "ticks" 60 times each second (at least in the USA) and though that is not perfectly accurate, the power system keeps track on how many "ticks" it has sent and updates the rate to make sure at the end of the day, it has distributed exactly 24hx60mx60sx60 "ticks" each day so all our clocks can be the same.
As someone studying networking this was a really fun video to watch!
That DS is actually in a draw near my computer setup not the closet but close enough. Also, I keep forgetting you are from Colorado
03:40 If it sends out a signal every minute, why is there a timestamp of 21:04:02?
1:04 I wonder if they just had an Aorus Elite Z390 board sitting around, or bought it for this gag. Seems like a weirdly expensive choice for a *throwaway* joke (badumtss)...
WWV (USA) and CHU (Canada) have been doing their time broadcasting for decades. They were on the air when I got my ham radio license back in the early 1960's. WWV is a time and frequency standard.