Just look at all the code to deal with it in D (written by Jonathan Davis):
Just look at all the code to deal with it in D (written by Jonathan Davis):
1.3MB and it's actually raw code. Amazing.
In past discussions of leap seconds, it came out that the POSIX standard specifies that no such second as 23:59:60 can exist (by specifying that "one day" consists of exactly 86400 seconds). As I understand things, this is why the erroneous behavior you mention is done.
It is not clear to me why, for the sake of complying with a standard we know to be wrong, we report false information and otherwise do things that we also know are wrong. The obvious approach would seem to be to either change the standard or just ignore it.
Sure, but they usually have more resources than programming language teams. Consider all the programming languages on your machine. Can you trust they all did the timezone, with all its nuances, correctly?
Consider something simpler - the trig functions. I've noticed time after time that many language libraries get it wrong, and this is with decades of development. Errors are usually in the form of precision that is lower than it should be, and poor handling of special values like NaN and infinity.
The situation with that is so erratic that with the D programming language we'd write our own trig implementations rather than use the C library ones.
Does Apple even have resources that work on tzdata code? Or do they just use open source code?
I wrote more about the issue here: http://www.creativedeletion.com/2015/12/03/timezone-updates-...
In particular for Elixir I trust the time zone data from Tzdata more than for any other language, mostly because I know it is designed to have up to date data. (And well, I know the code because I wrote it myself.)
Even if a system is good in many ways it does not matter if the data is not up to date.
Edit: Seems like we can specify CLOCK_TAI for clk_id on linux now.