jclark / rpi-cm4-ptp-guide

Guide to using the hardware PTP support in the Raspberry Pi CM4
MIT License
88 stars 10 forks source link

nmea: utc time is past leap second table expiry date #20

Closed kondou closed 1 year ago

kondou commented 1 year ago

Since from 00UTC today, ts2phc complaints like this. All three grandfmaster fell into this situation at the same time. This happens only to me? image

jmfriedt commented 1 year ago

Also happened to me as Buildroot generated linuxptp on a Compute Module4 did not have /usr/share/zoneinfo, which I copied from Debian/GNU Linux desktop. Check the content of the file /usr/share/zoneinfo/leap-seconds.list with its expiry date as

#       Updated through IERS Bulletin C64
#       File expires on:  28 June 2023
#
#@      3896899200

Just increase the expiry date or fetch https://www.ietf.org/timezones/data/leap-seconds.list for the updated version.

JN19aban commented 1 year ago

This is strange because on my CM4 have the correct leap-seconds.list with expiry date 28 December 2023

kondou commented 1 year ago

Sorry for a bit late reply, but that leap-seconds-list file works perfectly for me, and no restart was required even after that file was replaced. Thanks.

jclark commented 1 year ago

The whole leap second business with ts2phc is so sub-optimal: ublox receivers can provide the time in TAI, as well as the leap second offset.

kondou commented 1 year ago

I need to understand how to retrieve the time in TAI from ublox...

jclark commented 1 year ago

@kondou The UBX-NAV-TIMEGPS message provides this. I have written a program that takes advantage of this. The program is in a private repository currently, because there are a few things I want to do before I release it publicly. But if you would like to give it a try, I can give you access to the repo.

kondou commented 1 year ago

Thank you very much for the proposal of the trial. At the moment, the issue should not happen for the time being, and I have different projects to be done which is completely different from PTP. So, I'm okay after the public release. But, I may ask you when the priority of those projects is getting down.