News for hackers. Stuff that matters.
Re:Hate leap seconds? Imagine a negative one by tvb on Thursday January 13, 2022 @08:36PM (#29929538)
Only a positive leap second is “over in a second”. A negative leap second is essentially “over before it starts”. This asymmetry is an opportunity for code to implement UTC incorrectly.

Another issue is that a positive leap second cannot be represented using time_t-like representations. But at least every time_t value maps to a UTC time.

By contrast a negative leap second, should one occur, will cause a permanent illegal time_t value that has no existence in UTC. Checking for that illegal value in every piece of code that uses time_t values will not be fun.

Re:Hate leap seconds? Imagine a negative one by Dylan16807 on Thursday January 13, 2022 @10:14PM (#29930200)
> By contrast a negative leap second, should one occur, will cause a permanent illegal time_t value that has no existence in UTC. Checking for that illegal value in every piece of code that uses time_t values will not be fun.

Positive leap seconds, when translated into a dumb format and back, can be off by a second and won't round trip properly.

Negative leap seconds, when translated out of a dumb format and back, can be off by a second and won't round trip properly.

Seems pretty close to me.