From ff3f33d71faad5ab7f012c64e6f2cb7058823684 Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Mon, 10 Aug 2020 18:50:44 +0530 Subject: [PATCH] :bug: Fix uptime summary calculation --- summary.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/summary.ts b/summary.ts index bf8159a8..de56d768 100644 --- a/summary.ts +++ b/summary.ts @@ -76,9 +76,10 @@ export const generateSummary = async () => { ); }); const uptime = ( + 100 - 100 * - (secondsDown / - ((new Date().getTime() - new Date(startTime).getTime()) / 1000)) + (secondsDown / + ((new Date().getTime() - new Date(startTime).getTime()) / 1000)) ).toFixed(2); if (!history.data.length) continue; const averageTime =