Skip to content

Update leap second data if not found and/or expired on import

This should address https://git.ligo.org/cds/gpstime/-/issues/11 as LeapData will update automatically when it gets initialized.

Here's an example when LeapData is not able to find the leap second data upon import:

>>> import gpstime
/home/patrick/workspace/projects/ligo/gpstime/gpstime/leaps.py:112: RuntimeWarning: Leap second data not found. Downloading new leap second data to /home/patrick/.cache/gpstime/leap-seconds.list
  warnings.warn(
>>> gpstime.gpsnow()
1332859418.929935

Closes #11 (closed).

Merge request reports

Loading