News for hackers. Stuff that matters.
Re:2020 Leap Day Bugs by anonsivalley652 on Saturday February 29, 2020 @03:05PM (#22452693)
Stupid Q:

Why doesn't the syslog protocol (RFC5424) deal with leap seconds (the seconds field goes to 00-59, not 00-60)? Are they using UTC (they would have to ignore LS and have crappier logs) or TAI (doesn't have LS)?

https://mailarchive.ietf.org/arch/msg/syslog/DDLgKsRPITFXYSB...

http://www.madore.org/~david/computers/unix-leap-seconds.htm...

https://tools.ietf.org/html/rfc5424

https://cr.yp.to/libtai/tai64.html

https://cr.yp.to/libtai.html

Re:2020 Leap Day Bugs by marcosdumay on Saturday February 29, 2020 @06:20PM (#22453923)
Unix systems usually do not have extra seconds after 23:59:59. Leap seconds are normally dealt with by slowing your clock down. So Unixes use neither UTC or TAI, they use something else.

It's something that does not matter in 99.99% of the cases, and that other 00.01% need specialized hardware and software for dealing with it anyway.

Re:2020 Leap Day Bugs by wahern on Sunday March 01, 2020 @12:16AM (#22455249)
More specifically, POSIX explicitly defines a day as having precisely 86400 seconds. This makes calendar arithmetic trivial, including into the future, which would otherwise be impossible as leap seconds aren't predictable. Any program with a leap day bug is almost certainly not making use of Unix timestamps.

The corollary is that for the most commonly used APIs a Unix second isn't the same thing as an SI second. A Unix second is effectively defined in terms of the civil calendar, not as a fixed quantum of physical time.

Technically this doesn't preclude Unix date-time strings from displaying a 60th second. (And maybe some do.) But it would require unnecessary extra work, introduce inconsistencies (i.e. a generated string for a future date-time that happened to be a leap second would show :59 today but :60 at the moment of the leap second), and invite bugs.

Re:2020 Leap Day Bugs by klingonopera on Saturday February 29, 2020 @07:53PM (#22454346)
Precisely, get yourself five digital devices that track time, and see how many of them are even accurate to the second. Probably none of them. But implementation of leap seconds would only make sense on systems that at least fulfill that minimum criteria.

Leap seconds are things for stock market servers, atom clocks, scientific devices and the like.

Re:2020 Leap Day Bugs by wtallis on Saturday February 29, 2020 @03:16PM (#22452770)
Is there a real need for syslog to handle leap seconds? As that email you linked to points out, most implementations are likely to screw it up to some extent; requiring everyone to ignore leap seconds seems to narrow the range of possible behaviors. It also strikes me that syslog timestamps aren't something you should be depending on too heavily in the first place, especially not for things like calculating precise time durations between separate messages.
Re:2020 Leap Day Bugs by anonsivalley652 on Saturday February 29, 2020 @05:38PM (#22453694)
Two wrongs don't make a right, but three lefts do.

Throwing shade without evidence doesn't demonstrate professionalism, it demonstrates laziness.

Correlation on high-volume production systems requires precise timestamps all the time.

Re:2020 Leap Day Bugs by wtallis on Saturday February 29, 2020 @06:05PM (#22453856)
> Throwing shade without evidence doesn't demonstrate professionalism, it demonstrates laziness.

Who's throwing shade?

Re:2020 Leap Day Bugs by burpsnard on Saturday February 29, 2020 @05:43PM (#22453722)
it's bad enough guessing dmy or mdy, without wondering if we earned interest on that 10 billion euros that appears to have spent an entire second in a transit account earning 2.7% per annum (legal think 'annum' implicitly includes the leapsecond, an assurance resting on dozens of assumptions and misunderstandings of many ibscure treaties and standards and policies, modulo the case law in jurisdictions where precedents can redefine)
Re:2020 Leap Day Bugs by wtallis on Saturday February 29, 2020 @06:05PM (#22453852)
What does any of that have to do with syslog?
Re:2020 Leap Day Bugs by burpsnard on Sunday March 01, 2020 @07:31AM (#22456609)
assuming 'what happened to X' involves looking in logs