The video posted got me thinking on time again, though I’ve often pondered NTP and it’s reach in the modern world.

When I was a kid, we had a time and temperature phone number to call, on a fat, heavy, black dial-phone you could beat a man to death with (I made that gif for you ungrateful fuckers. Steal it.) That government source was our only way to synchronise our clocks and watches. Not that our timepieces were horribly inaccurate! But if you needed to be on the same page as your friends or homes or work clocks, call the number, get your shit right.

Now we take it for granted that all our clocks match within millionths of a second, across the entire planet. Hell, I’m frustrated when my Casio watch collection needs a couple of tweaks because they don’t have, or I didn’t set, the Daylight Savings Time option.

If you want to dig into NTP more, the wiki is a starting point, though far too technical for the uninitiated. Anyone have a more approachable source?

Discussed running my own NTP server with a friend. It’s way more complex than one would likely think. If you’ve never worked in software, bring up computer time to an engineer, get an earful, get yelled at. NTP is truly the unsung hero of the modern world.

  • Mr_Dr_Oink@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    38 minutes ago

    Fun fact about NTP

    It uses protocol number 123

    Completely independently the UK had a 3 digit number you could call to get the exact time “on the third tone, the time will be…” and the nunber to dial was 123.

    I always found that a fun coincidence.

  • LordCrom@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    4 hours ago

    A while back, i added GPS module to a Raspberry Pi. I modified ntp to accept time from the GPS signal. It turned out to deliver time with less than 10ms jitter. Thats about as accurate you can get without spending a thousand plus on an atomic solution.

    We did it for a distributed Radio antenna experiment.

  • HubertManne@piefed.social
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    8 hours ago

    Honestly I think the average non technical person does not realize how importance clocks and time are to computers and electronics.

    • shalafi@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 hours ago

      We techs could bore them to death with technicalities, but the time is impossible to internalize unless you lived the clustefuck of the last century. :)

      • naticus@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        1
        ·
        7 hours ago

        Or more accurately that their phones don’t change time at all, and that timezones just show the adjusted times. Only the adjustment changes. Internally everything is UTC.

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    10 hours ago

    Yes, it’s pretty awesome that anything with a network connection can sync itself with the correct time now. I wish more things did! That reminds me, I still haven’t taken my car’s clock off Daylight Saving Time.

    • adarza@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours ago

      i used to have a clock that sync’d to wwv (‘official’ u.s. time via nist shortwave radio), and a vcr that set its clock automatically using time data embedded in a tv station’s broadcast signal (eds/xds metadata).

      the clock was just a novelty.

      the time on the vcr was handy, but stations and networks rarely ran that accurately themselves. you were still gonna cut something off on either or both ends on a scheduled recording if you didn’t pad start and end times by a couple minutes yourself.

  • pHr34kY@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    18 hours ago

    If you go back further, it gets crazier.

    I did a holiday and visitied Grenwich. The agreed centrepoint for midday. It was cool to learn about the importance of it all.

    Then I went to Edinburgh castle and discovered the one o’clock gun. Basically, is would fire at the same precise moment each day and the ships would synchronise to the sound. Much like the phone time service.

    And yeah, I’m operating a stratum-1 node in the NTP pool. There are dozens of us.

    • SirEDCaLot@lemmy.today
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Well first the question- do you need accuracy or precision? The two are not the same. See this image.

      Take for example your computer. In it are many different electronic components operating at GHz speed. When communicating, they have to stay in sync, because for example if one device is sending data on the bus at 100.001 MHz and the other device is trying to receive at 100.005 MHz, they will lose their connection.
      In this aspect you need precision, not accuracy- the computer doesn’t care what time it is, it needs all the internal devices to measure passing time at the same rate. They need to be precise, but accuracy doesn’t matter (the computer will work if the clock is set wrong).

      Or take for example SSL/TLS (how security works on the Internet). When you try to initiate a secure connection, the data you exchange with the server is time-stamped, to ensure the data isn’t being recaptured and replayed from an old session. Thus the server and the client have to have about the same time- it works within several minutes to account for badly set clocks. That needs to be accurate, not precise.

      One of the easiest ways to get time data that’s both accurate and precise is actually from GPS. GPS satellites each have an onboard atomic clock, and they continually broadcast the current time along with their position in space. A GPS receiver locks onto signals from several of those satellites, and by looking at the difference in received time from various satellites measured against each other, it can compute the differences in distance to each satellite. IE- we’ll start with satellite A, it says it’s at position X, and we’ve got the time signal from it. Satellite B says it’s at position Y, and its time signal is 10ms behind A’s, so it’s about 3000km farther from us than A. Satellite C says it’s at position Z and its time signal is 5ms ahead of A’s, so it’s about 1500km closer to us than A. Stack a few satellites like that and it’s easy to calculate the only position on earth where all the math would check out, so you have your own position. The key then is knowing your own position, you also know the distance to each satellite, so you can correct the time signal for its travel time through the air and end up with a time source that’s both very precise and very accurate- a good time-source-focused GPS receiver can be accurate to within 30-50 nanoseconds and similar precision.

      This can be useful for example in cellular networks. Older style TDMA networks divided each channel up into timeslots, where each phone would be assigned a time slot in which to transmit. Those timeslots had to be precisely coordinated, so the tower would have a GPS receiver (for accuracy) and would then broadcast the current time to all connected phones (for precision). Newer style CDMA technologies do the same type of thing.

      If you need accuracy/precision beyond what a GPS time source can give you, you get into very specialized hardware like running your own atomic clocks. That takes some doing, because once you unbox your shiny new atomic clock you then have to set it from something, which is usually the average of GPS signals received over several hours.

      There’s also specialty hardware like high precision oscillators, IE a device that produces a VERY steady 10 MHz or PPS (1 pulse per second) output with high precision but has no idea nor care what time it actually is. That’s designed to keep an existing clock that’s already set accurate.

    • T3CHT @sh.itjust.works
      link
      fedilink
      English
      arrow-up
      9
      ·
      15 hours ago

      So glad you asked! (Even if it was sarcasm.) NTP is very good, usually adequate for coordination, even in robotic controls.

      But very good isn’t good enough in precise science. Imagine two processes digitizing adjacent sensor signals at MHz speed. Sequence and synchronicity are often key to interpretation of those signals - especially changes and transients. NTP level of sync can have enough uncertainty that the relationship cannot be stated, either signal may have enough uncertainty that a rapid event may have happened first on either, or maybe they were together.

      PTP is the next better option /solution to learn. Properly configured PTP systems can sync signals at digitally relevant speeds (MHz, GHz). More advanced systems and extension of the tech can get to syncs relevant to high energy physics phenomena.

      Science is awesome.

      • draeath@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        5
        ·
        15 hours ago

        At some point, aren’t you better off using a common oscillator instead of a local clock at all? My SDR has coax ports for this purpose, for example.

        • DontRedditMyLemmy@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          4 hours ago

          As all great engineers say: it depends! If synchronization is your goal and proximity is your luxury, a common oscillator is an excellent choice!

  • Artwork@lemmy.world
    link
    fedilink
    English
    arrow-up
    67
    ·
    edit-2
    9 hours ago

    Thank you… for appreciating what you have… we have… and for respecting the infinitely magnificent history, the effort, art, and love…

    The time zone database…

    4,000,000,000 Android phones and iPhones use his file. We didn’t count servers, Macs or laptops, which would push the number higher…

    On 29 September Paul put out version 2026e of the file. The first line of its notes says that Manitoba moves to permanent -05 on 31 October, which tells phones in Winnipeg not to set their clocks back on 1 November, and it was typed in by two volunteers a month ahead. Of the 251 changes made to the file in the last year, 218 were his and 28 were Tim Parenti’s.

    In 2011 an astrology software company sued Paul and Arthur Olson, who started the file in 1986 at the National Institutes of Health, claiming some of its history came from an atlas the company owned.
    The file’s mailing list and download site were switched off until IANA, which keeps the internet’s master lists, took them over later that month. The Electronic Frontier Foundation defended them for free, and the company dropped the case in February 2012.

    Source: https://sheets.works/data-viz/holding-up-the-internet

    • shalafi@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      29
      ·
      1 day ago

      Compute history fascinates me, and so many bits are hanging it there by a fingernail but for some dude that puts his time into it. Was just reading about the history of curl last week. I’m going over your link very carefully!

      My friend who I talked to about running an NTP server turned me onto Radia Perlman who invented Spanning Tree Protocol (STP). An old white woman, who no one has ever heard of, is wholly responsible for stopping packet storms. And now STP is simply taken for granted as a normal thing for a network to utilize. I’ve plugged various switches into themselves, just to test, no problem. SOHO gear doesn’t even have the option to turn off STP! It just works.

      I have utmost respect for my “forefathers”. :)

  • TranquilTurbulence@lemmy.zip
    link
    fedilink
    English
    arrow-up
    5
    ·
    21 hours ago

    Speaking of Wikipedia, many articles aren’t really very approachable. Just the other day I was reading about rings, and I felt like I should have taken at least three more mathematics courses to read this article. Some articles just aren’t meant for anyone who isn’t qualified to write the article itself.

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      16 hours ago

      Wikipedia works perfectly as a reference. That is, to remind you of something you already knew but forgot the details. It is awful (specially for maths) to learn something new.

      • TranquilTurbulence@lemmy.zip
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 hours ago

        Feels a lot like the man pages in Linux. If you have no idea what a command does or how to use it, studying the man pages will guarantee that you’ll spend a long time scratching your head. If you already know, and you have a very specific question, like was it -t [number] for time, or maybe -d [number] for delay… Just scroll a little bit and you’ll find out that it was -n [number] because why not. Also the number is in 1/10th seconds, because that’s why. Blogs are for learning, man pages are for refreshing your memory.

      • T3CHT @sh.itjust.works
        link
        fedilink
        English
        arrow-up
        7
        arrow-down
        1
        ·
        15 hours ago

        Disagree.
        Wikipedia is not a textbook, so it doesn’t package up smaller or foundational concepts and detail them inside of other pages to give you a ‘full explanation’. Nor should it, because it would undermine its structure; all high level concepts fundamentally rely on an entirely massive foundation of other concepts, relations, and definitions. While a textbook format curates and stacks that foundation, building on a curriculum to ensure the concept being presented has enough context for a new learner. (Think of textbook and school as learning kits, all the required pieces and every piece in a place, but not the only way to do it.)

        Wikipedia builds a semantic structure with links instead. It’s goal is to encode all human knowledge. While there are certainly still choices in usage of language and concepts to define a subject, it is not necessary to reiterate the chosen concepts and definitions in situ. Doing so would dramatically increase the burden and start to replicate definition all over. If the article on multiplication has to explain addition, addition is now defined twice.

        They link instead, and if you don’t understand a statement, you need to read the linked articles. If those aren’t understandable, you need to recursively obtain the info linked in there. Turtles all the way down to basic definitions, then over to philosophy. This is a beautiful thing for organizing information.

        Wikipedia is not ideal for learning high level concepts from scratch though, as your foundation is likely inadequate to understand without additional context. If you lack too much of the foundation, reading down all the associated information paths becomes a colossal task; because every concept links to a full definition, there is no curation, not a guided kit for learning, a full inventory of everything.

        It’s not Wikipedia’s fault that you can’t understand something from just a full definition of it without further definitions. None of us can understand anything from a definition - we’re human and have real limits. That’s why we have schools and universities, that’s why we call people experts, that’s why we value experience, don’t confuse information with knowledge.

  • rich@lemmy.ragg.uk
    link
    fedilink
    arrow-up
    3
    ·
    18 hours ago

    I’ve created some live poker clocks which, as they boot up, synchronise their local RTC with some Ntp calls … I do wonder if I should run my own service but it’s such an efficient protocol I don’t the servers would notice the few extra calls per week