mikedilger / astrotime

Time for astronomy
Apache License 2.0
6 stars 0 forks source link

Conversion to/from UTC near leap seconds #1

Open mikedilger opened 2 years ago

mikedilger commented 2 years ago

Currently, we are changing standards between Instants, not between DateTimes. But Instant's cannot differentate a leap second (:60) in UTC, while DateTimes can. As a result, mappnig an instant inside of a leap second to another standard and back will not result in the same Instant.

We have to rearchitect. Instants are the obviously useful place to convert TCB and TCG to and from TT. But they are impossible for UTC to TAI and back. So I'm going to move the conversions to the DateTimes, and those functions will use Instants (or similar) internally where useful.

I've had a few false starts, and work has gotten in the way, but this is coming.