EphCore.AstronomicalTime.Tables.LeapSeconds (eph_core v0.1.0)

Copy Markdown View Source

Supervised ETS cache of the UTC ↔ TAI leap-second table.

Started with the application, it parses the SPICE leap-seconds kernel naif0012.tls (or Skyfield's tai-utc.dat) once and serves the offset for a given UTC timestamp to EphCore.AstronomicalTime.InternationalAtomicTime. Both files are small ASCII tables listing every offset boundary since 1972; IERS announces new leap seconds about six months in advance, so refreshing the file is a rare, out-of-band task.

Timestamps before 1972 use a zero offset, following Skyfield issue #679.

Run mix eph.download_kernels to fetch naif0012.tls.

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the leap offset in microseconds for the given UTC timestamp. Accepts either a DateTime in UTC or an integer unix microseconds.

Force reload leap seconds table from disk.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

offset_at(utc_datetime_microseconds)

Returns the leap offset in microseconds for the given UTC timestamp. Accepts either a DateTime in UTC or an integer unix microseconds.

reload!()

Force reload leap seconds table from disk.

start_link(opts \\ [])