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@...>