diff --git a/NEWS b/NEWS index e154ebee..41c944a1 100644 --- a/NEWS +++ b/NEWS @@ -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 ============= diff --git a/glances/plugins/glances_uptime.py b/glances/plugins/glances_uptime.py index 8678ebb3..e57818da 100644 --- a/glances/plugins/glances_uptime.py +++ b/glances/plugins/glances_uptime.py @@ -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