What would/wouldn't break w/ a negative leap second
Happy US Thanksgiving break for those who celebrate. I'm just totally nerding out this week. I don't have much going on but I definitely have a date with a giant Costco ham in the future. Gotta get my annual nitrates quota in. Mmmm.
Also! Join Data-Crafters! It's a mailing list for people who work with data but also enjoy crafts/hobbies and want to get together (online) to do the occasional fun get-together. Currently there's a poll (see the msg archive) for when we should first meet to just say hi and show off one of our interests to everyone. Looking for a time some time in the next 2-3 weeks. Hope to see some of you there!
Since leap seconds are effectively, and soon to be officially dead, as of May of next year, I still had one lingering question in my head: IF we had a negative leap second, what could have possibly gone wrong? ( For details about the abolishment, see: Farewell, leap seconds). All computer people just "knew" things were going to break, but no one I could find was saying what and how things would break.
The widely accepted consensus from just about everyone I'm aware of is that "a negative leap second would be a disastrous mess for computing systems worldwide. In fact, in the video that explained many of the things the working group considered before proposing the new leap second rules had consulted various industry and technology groups (at about 21-23min into the video) and the feedback all pointed in that same general direction.
Now, the video cites various feedback, but I was curious as to whether anyone had actually documented testing out the situation to see what would happen. Now, the official recommendations from groups with complicated acronyms like IEEE, IERS, CGSIC all said things to the effect of "it's rarely tested, if at all, and some things are known to break". But what I wanted to find was any evidence that people ACTUALLY tried running a negative leap second through a computer system to see what would happen.
For reference, when a normal positive leap second is declared, what happens on our computers is that at just before midnight UTC, at 23:59:59, the clock ticks to 23:59:60 before rolling over to 00:00:00 of the next day. In theory for a negative leap second, clocks would go from 23:59:58 and tick immediately to 00:00:00 the next day.
Searching around for those instances proved to be very difficult because it's a ridiculously niche thing to consider testing, and for the few people who do these tests, they have very little incentive to blog or publish about it. At best it's knowledge that either translates into a code fix somewhere, or gets filed as a piece of mental trivia.
But I did find a couple!
The most direct came from this blog post Douglas Arnold that says "when we tested negative leap seconds at the ISPCS PTP Plugfest events, many devices have failed." That links to a blog post in 2024 that described the "International Symposium on Precision Clock Synchronization" PTP Plugfest. In this context PTP stands for "Precision Time Protocol" which is a protocol that was developed after NTP to distribute time even more accurately than what NTP can theoretically do. Of most interest here is that PTP runs on atomic time (TAI) and so technically shouldn't care about leap seconds because it just counts SI seconds since an epoch.
The PTP Plugfest is when a bunch of engineers who build PTP devices gets together and quite literally plugs their hardware into other hardware to see if they work together. Part of the testing includes explicitly testing negative leap seconds. While it's not clear when the bug was found (likely 2023 or a previous plugfest), the post did say this: "These circumstances tend to bring out bugs, such as the fact that the Linux kernel can’t properly handle a negative leap second."
Then, another blog post, this time from 2023 for Inside GNSS, it cites a 2022 plugfest result (footnote 20) where "it was found that one participant’s Device Under Test treated a negative leap second as a positive one. The cause was traced to the format of the Uni Erlangen time string, which does not allow for a negative leap second (Thomas Behn, private communication). This is why we test."
The IETF Minutes from April 2025 also cited the plugfests results about finding bugs in Linux and such to hypothesize that NTP would also show potential issues, but sadly they didn't seem to cite an actual test.
There's a tiny fragment in Red Hat's customer portal KB that mentions ntpd not handling leap second deletions properly in 2017, but I don't have access to the rest of the KB.
NTP fixed Bug 3394 in 2018, which was about leap second deletions not working on ntpd clients
Paul Eggert, the literal one guy who leads ownership of the timezone file that EVERYONE relies on mentioned in 2021 that while testing negative leap seconds on tzcode, it uncovered "one (verrry unlikely) tzcode bug". A 2017 comment about leap seconds essentially says what everyone is thinking, that the code path was rarely, if ever, executed and that's why it can be buggy or broken without anyone noticing. This is true for all software, not just tz.
And that's about all I could find about things breaking! It's really sad and small.
Some stuff NOT breaking
While digging hard for examples, I did find something unexpected... people saying their software worked fine. From November 2020, there was this post on the FreeBSD mailing list where someone explicitly tested it with their ntpd implemenation. Their conclusion was: "The kernel and ntpd handle it just fine. No telling what any given application might do in reaction to a skipped second."
HP has documentation since 2005 about how their xnptd implementation implements adding/deleting seconds to the clock as needed and it is "handled appropriately". Whether this is actually true remains a mystery, but that's what the claim is.
Microsoft, in 2018, snarkily mentioned that they could handle leap seconds going forward and backwards for Windows Server. Interestingly, as of a few weeks ago, all the leap second code was ripped out of Window's STL chrono package now that it isn't needed.
More fun, in 2020, a patent was filed from Microsoft, for a way for a system to give either true time to an app that requests it, or a special legacy-compatible time that has leap seconds hidden in such a way legacy apps wouldn't even know something weird was going on and only see a monotonic continuous time scale.
The Linux GPSD, a daemon for Linux that handles GPS time, made a post in 2021 saying that after some fixes to misbehaving test, negative leap seconds were handled fine by that code.
So, how bad would things have been?
It's impossible to say, because while a lot of infrastructure level stuff, the Linux Kernel, Windows, the BSDs which likely would've influenced MacOS, had been slowly poking at the idea of negative leap seconds for many years now. The problem though isn't the operating system but in the application software. There's absolutely no predicting how sloppy application code is with respect to time.
One "nice" thing about negative leap seconds is that they jump forward in time. A computer just sees 23:59:58, and then sees 00:00:00 the next second. A positive leap second can have software seeing the "same" second twice, 00:00:00 when it should have registered 23:59:60, and then again the next second. There's less chance something will divide by 0 with such a situation.
It seems that, if the software doesn't flat out crash because it's doing incorrect math using poor assumptions, clocks will probably disagree by 1 or 2 seconds. Some systems will pick up the leap second correctly, while others may ignore it or accidentally flip the sign. For the vast majority of everyday software, a second of different wouldn't matter. But things that require extremely precise time, like financial transactions and certain distributed database systems that rely on hyper accurate clocks to derive event order guarantees will start disagreeing about time. Arguably, those are the systems we DON'T want breaking.