gpstime.leaps module
- class gpstime.leaps.LeapData(path)[source]
Bases:
object
Leap second data class
- as_unix(since_gps_epoch=False)[source]
Return leap second data with times represented as UNIX.
If since_gps_epoch is set to True, only return leap second data since the GPS epoch (1980-01-06T00:00:00Z).
- property data
Return leap second data with times represented as UNIX.
- property expired
True if leap second data is expired
- property valid
True if leap second data is available and not expired
- gpstime.leaps.find_leap_data(download=None)[source]
Find leap second data
System and user cache locations will be searched. If a local file is not found, one will be downloaded from the canonical online source.
There are three options for the download argument:
- True: System leap data will be ignored and the leap data file will
be downloaded from the remote source.
False: Only system leap data will used.
- None (default): The first available leap data will be used, and it
will be downloaded if the system leap data is not available or invalid.
Downloaded leap data will be stored in the local user cache directory.