瀏覽代碼

nodelist: fix calculation of negative uptime

Nils Schneider 9 年之前
父節點
當前提交
3a6d4855a9
共有 1 個文件被更改,包括 1 次插入1 次删除
  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) {