update_if_needed#

spacekernel.iers.update_if_needed() None#

Refresh bulletins if the last update is over seven days old.

This function compares the current UTC time against the timestamp returned by get_latest_update(). If more than 7 days have elapsed, it prints a notice and calls update_bulletins() to download and cache fresh data.

Raises:
IOError

If reading or writing the latest_update JSON file fails.

requests.HTTPError

If any bulletin download fails during update_bulletins().