Menu

Commit [59e6f2]  Maximize  Restore  History

ts2phc: Fix timestamp conversion for leap seconds.

The UTC timestamp parsed from the RMC message needs to be converted to
TAI in order to calculate the PHC offset. This conversion was done after
adjusting the timestamp for the measured delay between the reception of
the message and the following pulse, which caused the offset measured by
ts2phc to have a one-second error if the message expected during or
after a leap second was missed.

Apply the TAI-UTC offset to the timestamp parsed from the RMC message
before any adjustments are made to avoid the error.

Signed-off-by: Miroslav Lichvar <mlichvar@...>
Reviewed-by: Jacob Keller <jacob.e.keller@...>

Miroslav Lichvar Miroslav Lichvar 2024-06-11

Richard Cochran Richard Cochran 2024-07-30

changed ts2phc_nmea_pps_source.c