From 2150a4832e5e00be605ee310c770c7ccf4627563 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sat, 31 Aug 2024 16:22:29 -0500 Subject: [PATCH] fix uptime calcuations --- stats.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stats.js b/stats.js index df58f21..dc581da 100644 --- a/stats.js +++ b/stats.js @@ -102,11 +102,18 @@ function calcStats(instance){ i++; } + console.log(daytime); instance.online=online; alltime/=totalTimePassed; if(totalTimePassed>1000*60*60*24){ + if(daytime===-1){ + daytime=online*1000*60*60*24; + } daytime/=1000*60*60*24; if(totalTimePassed>1000*60*60*24*7){ + if(weektime===-1){ + weektime=online*1000*60*60*24*7; + } weektime/=1000*60*60*24*7; }else{ weektime=alltime;