adev.py

Gary E. Miller gem at rellim.com
Wed Jul 20 23:45:58 UTC 2016


Yo devel at ntpsec.org!

On Wed, 20 Jul 2016 16:35:15 -0700
Hal Murray <hmurray at megapathdsl.net>, devel at ntpsec.org wrote:

> gem at rellim.com said:
> > # a peerstats line looks like this:
> > # 57589 0.805 127.127.28.1 961a -0.000021843 0.000000000
> > 0.000233609 0.0000= 05153 # column one is the GPS week, column two
> > is the seconds into the week.   
> 
> Where did you get that?  The insides of ntpd know nothing about GPS.
> 
> The ntpd stats files use MJD and seconds of day.

Sorry, misleading comment.  The variable is indeed named mjd in the code.

> This is backwards, but you can reverse it:

Uh, oh.  I copied that part directly from Dan Drown's timstamps perl in
his chrony-graph package.

> MJD_1970 = 40587           # MJD for 1 Jan 1970
> 
>   now = time.time()
>   day = int(now)/86400
>   sec = now - day*86400
>   mjday = day + MJD_1970

Are you saying the unix time stamp result in the output is wrong?

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160720/63e5a069/attachment.bin>


More information about the devel mailing list