[Git][NTPsec/ntpsec][master] Fix bug in reference time for mru printouts
    Hal Murray 
    gitlab at mg.gitlab.com
       
    Sun Dec 25 10:40:28 UTC 2016
    
    
  
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
cde545b9 by Hal Murray at 2016-12-25T02:38:55-08:00
Fix bug in reference time for mru printouts
	It was using the local start time rather than
	the end of collection time returned by the server.
	That gave negative lstint and maybe other strange printouts.
- - - - -
2 changed files:
- ntpclients/ntpq
- pylib/util.py
Changes:
=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -1232,6 +1232,7 @@ usage: config_from_file <configuration filename>
                     self.say(("=" * ntp.util.MRUSummary.width) + "\n")
                     # reversed puts most recent entries at the top if no sort=
                     # see sort comments in pylib/packet.py
+                    formatter.now = span.now
                     for entry in reversed(span.entries):
                         self.say(formatter.summary(entry) + "\n")
                     self.say("# Collected %d slots in %.3f seconds\n" \
=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -475,7 +475,7 @@ class MRUSummary:
     "Reusable class for MRU entry summary generation."
     def __init__(self, showhostnames):
         self.showhostnames = showhostnames	# If false, display numeric IPs
-        self.now = time.time()
+        self.now = None
         self.logfp = sys.stderr
         self.debug = 0
 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cde545b98cd50ddc581c09e4d45a27960398359d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161225/27d3181e/attachment.html>
    
    
More information about the vc
mailing list