Package org.yamcs.utils
Class TaiUtcConverter
- java.lang.Object
-
- org.yamcs.utils.TaiUtcConverter
-
public class TaiUtcConverter extends Object
Utility class to convert between TAI and UTC. It reads the UTC-TAI.history (available at http://hpiers.obspm.fr/eoppc/bul/bulc/UTC-TAI.history)It only supports added leap seconds not removed ones (negative leap seconds have never happened and probably never will).
It only works correctly with the times after 1972 when the difference between TAI and UTC is an integer number of seconds.
Most of the code is copied or inspired from the TAI C library http://cr.yp.to/libtai.html
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaiUtcConverter.DateTimeComponents
static class
TaiUtcConverter.ValidityLine
-
Constructor Summary
Constructors Constructor Description TaiUtcConverter()
TaiUtcConverter(InputStream utcTaiHistory)
-
-
-
Constructor Detail
-
TaiUtcConverter
public TaiUtcConverter() throws IOException, ParseException
- Throws:
IOException
ParseException
-
TaiUtcConverter
public TaiUtcConverter(InputStream utcTaiHistory) throws IOException, ParseException
- Throws:
IOException
ParseException
-
-