From 892e05dcc3fcc88b4c4f0f3e2d9982c9f1772e23 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Thu, 5 Sep 2019 11:33:38 +0800 Subject: scripts: return abs for offset --- scripts/run_bp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run_bp.py b/scripts/run_bp.py index e49ca01ee..ce2efc1c5 100755 --- a/scripts/run_bp.py +++ b/scripts/run_bp.py @@ -76,7 +76,7 @@ def get_time_delta(): """Compare time with NTP and return time delta.""" c = ntplib.NTPClient() response = c.request('tw.pool.ntp.org', version=3) - return response.offset + return abs(response.offset) def generate_node_key(nodekey): -- cgit