[ntp:hackers] [gpsd-dev] gpsdate program, similar to 'ntpdate'

tsg tglassey at earthlink.net
Fri Jun 21 14:01:33 UTC 2013


On 06/21/2013 12:17 AM, Harald Welte wrote:
> Hi C.J.,
>
> On Thu, Jun 20, 2013 at 03:56:00PM -0700, C.J. Adams-Collier wrote:
>> I hear ntpdate has been deprecated long time and obsoleted in new releases.
>>
>> Try ntpd -q
> I have tried this long ago, and would be happy if things would have been
> that simple.
>
> ntp_refclock:refclock_process_f() calls libntp:clocktime() and the
> latter aboslutely cannot deal with the fact if e.g. your embedded
> system without RTC boots up assuming it is January 1st 1970 and a GPS
> reference time in the year 2013 has been received.

Why not put a new epoch into the system in the form of a command to set 
the time as part of the startup. Code a statement into the scripting 
that sets the time to 2013 if the issue is 1970. But the real problem is 
the -g switch functionality I think.
>
> I looked into fixing the ntpd/libntp code some months ago, but gave up
> as it seems to be written on the assumption that there simply are not 43
> years of difference between two timestamps.

Again - set the initialization time so there isnt.
>
> Having said that, I'm clearly not a ntpd expert and happy to try
> whatever method people suggest here.  But after lots of debugging and
> ntp source code reading I arrived at the conclusion that it is not
> possible using the existing code, which prompted the implementation of
> gpsdate.
>
> Regards,
> 	Harald
>


-- 
// Standard "perasonal email" disclaimers apply



More information about the hackers mailing list