From 532bcb2bd1c4a25de18a76d8063185112b06bb8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Casas=20Sch=C3=B6ssow?= Date: Mon, 26 Apr 2021 20:00:41 +0200 Subject: [PATCH] Fixed a bug in uptime presentation --- src/Services/System.vala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Services/System.vala b/src/Services/System.vala index b9e05dd..6472e73 100644 --- a/src/Services/System.vala +++ b/src/Services/System.vala @@ -55,11 +55,7 @@ namespace WingpanelSystemMonitor { if (days > 0) { upsec = upsec % (24 * 3600); - int hours = upsec / 3600; - upsec %= 3600; - int minutes = upsec / 60; - upsec %= 60; - _uptime = days.to_string ().concat (" days, ", hours.to_string (), ":", minutes.to_string (), ":", upsec.to_string ()); + _uptime = days.to_string ().concat (" days, ", Granite.DateTime.seconds_to_time (upsec)); } else { _uptime = Granite.DateTime.seconds_to_time ((int)uptime.uptime); }