Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nmea: Fix conversion of leap second.
When a leap second is inserted, the RMC message reports time of 23:59:60, which overflows in mktime() to 0:00:00 after the leap second with an incremented TAI-UTC offset. This causes a one-second error in the offset meaured by ts2phc. Check the seconds field of the RMC message and convert 60 to 59 to make the timestamp ambiguous per is_utc_ambiguous() and ignored by ts2phc to avoid updating the clock with the one-second error. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
- Loading branch information