When exporting, uptime values loop after 1 day #1092

This commit is contained in:
nicolargo 2017-05-20 11:00:17 +02:00
parent dc20a08e7d
commit 22e69d870c
2 changed files with 4 additions and 1 deletions

1
NEWS
View File

@ -19,6 +19,7 @@ Bugs corrected:
* Problem with non breaking space in file system name (issue #1065)
* TypeError: string indices must be integers (Network plugin) (issue #1054)
* No Offline status for timeouted ports? (issue #1084)
* When exporting, uptime values loop after 1 day (issue #1092)
Version 2.9.1
=============

View File

@ -59,7 +59,9 @@ class Plugin(GlancesPlugin):
Export uptime in seconds.
"""
return {'seconds': self.uptime.seconds}
# Convert the delta time to seconds (with cast)
# Correct issue #1092 (thanks to @IanTAtWork)
return {'seconds': int(self.uptime.total_seconds())}
@GlancesPlugin._check_decorator
@GlancesPlugin._log_result_decorator