From 3a6d4855a995e7a525d90a1449e9d505466a1f6c Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 19 Apr 2015 13:35:49 +0200 Subject: [PATCH] nodelist: fix calculation of negative uptime --- lib/nodelist.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nodelist.js b/lib/nodelist.js index e867eed..8edb3be 100644 --- a/lib/nodelist.js +++ b/lib/nodelist.js @@ -3,7 +3,7 @@ define(["sorttable", "virtual-dom", "numeral"], function (SortTable, V, numeral) if (d.flags.online && "uptime" in d.statistics) return Math.round(d.statistics.uptime) else if (!d.flags.online && "lastseen" in d) - return Math.round(-(now - d.lastseen) / 3600) + return Math.round(-(now.unix() - d.lastseen.unix())) } function showUptime(uptime) {