Browse Source

nodelist: fix calculation of negative uptime

Nils Schneider 9 years ago
parent
commit
3a6d4855a9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/nodelist.js

+ 1 - 1
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) {