Posted Jul 2, 2012 18:48 UTC (Mon) by slashdot (guest, #22014)
Parent article: The leap second bug
* Leap second occurs, CLOCK_REALTIME is set back one second.
OK, the terminal idiocy is right there.
Who thought of this dumb idea?
I mean, libc already has to handle timezones when converting to human time, so surely it can handle leap seconds as well, allowing an unambiguous absolute time representation which is also monotonic if time is correctly set and synchronized.
One would think that the POSIX standard committee would not approve such a totally broken interface that jumps back one second on perfectly working systems, but clearly that's not the case.
And obviously whoever used CLOCK_REALTIME to do timeouts not tied to real time is also not a genius.
I also fail to see why we have leap seconds at all, given that I don't think anybody cares if the sun sets a minute later on average, but that's not the real issue.