1) UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
to call the function with an earlier date. If this is attempted,
zero is returned together with a warning status.
Because leap seconds cannot, in principle, be predicted in
advance, a reliable check for dates beyond the valid range is
impossible. To guard against gross errors, a year five or more
after the release year of the present function (see the constant
IYV) is considered dubious. In this case a warning status is
returned but the result is computed in the normal way.
For both too-early and too-late years, the warning status is +1.
This is distinct from the error status -1, which signifies a year
so early that JD could not be computed.
Fix
Update the ERFA used by STARE.
Return the ERFA-produced date instead of throwing an exception.
Return the ERFA return code to flag dubious years or other exceptions.
Discovered via https://github.com/SpatioTemporal/pystare/issues/120. Crashes pystare.
Root cause: https://github.com/liberfa/erfa/blob/master/src/dat.c.
Fix