diff --git a/plugins/systemd/timesync_status b/plugins/systemd/timesync_status index 63eb8ec8..c223d633 100755 --- a/plugins/systemd/timesync_status +++ b/plugins/systemd/timesync_status @@ -57,6 +57,10 @@ def parse_time(value): if ' ' in value: return sum(parse_time(x) for x in value.split(' ')) + # If time is exactly zero (for example Jitter), there is no unit (suffix) + if value == "0" or value == "-0": + return 0 + match = re.match(r'^([+-]?[0-9.]+)([a-z]+)$', value) if not match: raise ValueError('Invalid time ' + value)