4 ms·
So. How do I compensate for this if I wish to convert a milliseconds since epoch value to an accurate datetime type? Are these the concerns that smart people wh
by ed_blackburn 13y ago
So. How do I compensate for this if I wish to convert a milliseconds since epoch value to an accurate datetime type? Are these the concerns that smart people who write DateTime types in frameworks deal with?
- rmccue 13y agoYou don't have to; solar days are not the same as "normal" days (defined by TAI and used by UTC). This is why we have leap years, and leap seconds in UTC.
- avian 13y agoThe effect discussed here averages itself out over the course of one year. Leap years and leap seconds are required due to other effects that don't (leap years because of the non-integer ratio between year length and day length and leap seconds because the length of day is increasing slowly)
- MichaelGG 13y agoWell you do sorta have to deal with it; leap seconds aren't fun, and are actually quite stupid. Time's already complicated enough without adhering to a few folks that care about "solar" time. Either kill them off, or move to leap hours (which puts the next jump so far out, no one will care).
- hkolk 13y agoLeap seconds are not accounted for in epoch-time. Basically, 23:59:59 and 23:59:60 have the same value (this also makes it easier by not having to handle the 60 :) ) We disabled leap-seconds at work in our NTP servers, and just use the normal mechanisms to compensate slowly.
- minikites 13y agoTime is hard: http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time http://infiniteundo.com/post/25326999628/falsehoods-programm... http://infiniteundo.com/post/25509354022/more-falsehoods-programmers-believe-about-time-wisdom http://infiniteundo.com/post/25509354022/more-falsehoods-pro... http://googleblog.blogspot.com/2011/09/time-technology-and-leaping-seconds.html http://googleblog.blogspot.com/2011/09/time-technology-and-l...