FugroRoames / Chrono.jl

Scientific time keeping for Julia
Other
8 stars 1 forks source link

isn't the leapsecond adjustment exactly the wrong way when comparing UTC times? #7

Open skilchen opened 6 years ago

skilchen commented 6 years ago

Not that i understand the issue of leapseconds very well, so my understanding could be wrong. In my understanding the UTC Day 2016-12-31 has a duration of 86401 seconds not 86399. As far as i understand TAI currently ticks slightly too fast in relation to something like solar mean time.

utc1 = Chrono.Time(1hours, UTCDate(2016, 12, 31))
utc2 = Chrono.Time(1hours, UTCDate(2017, 1, 1))
utc2 - utc1

gives:

86399//1 seconds

but in my opinion it should give:

86401//1 seconds
andyferris commented 6 years ago

Yes, that sounds like a bug.

(See also #5).

andyferris commented 6 years ago

@c42f Are the signs wrong here: https://github.com/FugroRoames/Chrono.jl/blob/master/src/clock.jl#L182 ?

andyferris commented 5 years ago

I've lost track - is this still wrong?