Skip to content

Leap second time bomb in utilities/spice/time_ephemeris #1287

@jameswilburlewis

Description

@jameswilburlewis

There's code that disables the time_ephemeris routine if it's gone too long without an update:

    disable_time = time_double('2027-07-01')  # time of next possible leap second

    if time_double() > disable_time - 30*86400.0:
        logging.warning('Warning: This procedure must be modified before ' + str(disable_time) + ' to account for potential leap second')

    if time_double() > disable_time:
        raise ValueError('Sorry!  This procedure has been disabled because it was not modified to account for a possible leap second on ' + str(disable_time))

    if time_double() > disable_time - 7*86400.0:
        logging.warning('Warning: This procedure must be modified before ' + str(disable_time) + ' to account for potential leap second at that time.')

The cutoff date was 2026-01-01, which has arrived on the East Coast. I changed it to 2027-07-01 (probably should have been 2026-07-01, actually) but maybe there's a better way to handle this? Maybe we could periodically fetch a leap second table from somewhere?

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions