Good morning, Patrik,
On 1/3/17 7:29 AM, Patrik Fältström wrote:
I think personally, as long as we do have leap seconds:
- we should have the leap second information available somewhere in clear
machine readable format. Some suggestions exists, including encoding it in
A-records in DNS ;-)
- we should look at having the time since epoch really be the number of
SI-seconds since the epoch
- we should have translation between number of seconds and UTC take leap
seconds into account
The TZDB at IANA contains the file "leapseconds" which is machine
readable, and provides a history of all leapseconds. This provides you
the 1st and 3rd of your requirements.
- we should fix the code that do not accept 61 seconds in a minute
Now, we can also say we should stop having leap seconds, but I feel that is a
_different_ matter and different discussion. I am myself not clear over what
is the correct thing regarding leap seconds.
What I am sure of is that I think most of the problems we have is because of
bad programming (including in old UNIX days the priorities although correct
at the time have continued to let the time_t definition continue to be wrong).
I'm of two minds as well. On the one hand, the current system makes it
quite easy to do the wrong thing, and that's not good. There are
utility functions such as pytz's normalize() and localize() functions
that people just don't know about, for instance. On the other hand,
it's not just leap seconds. It's timezones in general, it's DST
transitions, etc. Getting rid of leap seconds only marginally improves
things, and gets really philosophical really quickly...
Eliot
signature.asc
Description: OpenPGP digital signature