lfpinit() signed or unsigned?
Hal Murray
hmurray at megapathdsl.net
Fri Mar 10 07:30:43 UTC 2017
esr at thyrsus.com said:
>> Does the current code have the right variable? Have you found it?
>> Is there more than one place that does NTP to Unix conversion?
> What you're looking for is called the "pivot point", snd it's implemented in
> libntp/systime.c.
Thanks.
> There used to be sporadic NTP-to-Unix conversions all through the code. I
> moved as many of them as I could find to use lfp_stamp_to_tspec(), but I'm
> not sure I got them all. A good way to check would be to grep for JAN1970
> and look at the code near those hits.
lfp_stamp_to_tspec is an inline defined in include/timespecops.h and only
used in libntp/pymodule.c
It calls ntpcal_ntp_to_time, but that is only called by common_prettydate in
libntp/prettydate.c
I'd expect there would be one place that converts ntp to unix and one place
that converts unix to ntp. Actually, the latter isn't necessary except maybe
for debugging. You don't really need ntp to unix because you are going to
subtract now to get a delta. You can get that by converting now to ntp and
subtracting that.
--
These are my opinions. I hate spam.
More information about the devel
mailing list