From 76e79bfbb4189c825d4fec06cb2043b8d1099138 Mon Sep 17 00:00:00 2001 From: "Glitch (presence-button)" Date: Sat, 9 May 2020 20:31:31 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=86=F0=9F=8D=93=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/140?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server.js b/server.js index c234328..9efc557 100644 --- a/server.js +++ b/server.js @@ -71,9 +71,7 @@ app.get("/api", (req, res) => { fuzIsOpen, lastSeen, lastClosed, - processUptime: new Date(process.uptime() * 1000) - .toISOString() - .substr(11, 8) + processUptime: formatSeconds(process.uptime()) }, null, 4 @@ -201,8 +199,8 @@ request.post( } ); -const formatSeconds = function () { - var seconds = Math.floor(this), +const formatSeconds = function (seconds) { // https://stackoverflow.com/a/13368349 + var seconds = Math.floor(seconds), hours = Math.floor(seconds / 3600); seconds -= hours*3600; var minutes = Math.floor(seconds / 60);