You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this is saying my server has been up for 18 days, 17 hours, and 39 minutes, correct? So, my script for calculating time is this (its the same as my discord.js client.uptime script, which ive proved over 72 hours works fine in internal testing) is:
varserverUptime=os.uptime();letserverSeconds=(serverUptime/1000);letsdays=Math.floor(serverSeconds/86400);letshours=Math.floor(serverSeconds/3600)-(sdays*24);serverSeconds%=3600;letsminutes=Math.floor(serverSeconds/60);letsseconds=Math.floor(serverSeconds%60);varserverUptimeCalc=`${sdays} days, ${shours} hours, ${sminutes} minutes and ${sseconds} seconds`;
This should give me the uptime, correct? Well, no. When I print serverUptimeCalc, I get:
0 days, 0 hours, 26 minutes and 59 seconds
I ran this 10 minutes ago, and it gave me 26 minutes 58 seconds.
Is this a bug, or am I just terrible at making time scripts?
The text was updated successfully, but these errors were encountered:
Trying to make a function that sends the server uptime. When I run
uptime
, I get:So this is saying my server has been up for 18 days, 17 hours, and 39 minutes, correct? So, my script for calculating time is this (its the same as my discord.js client.uptime script, which ive proved over 72 hours works fine in internal testing) is:
This should give me the uptime, correct? Well, no. When I print serverUptimeCalc, I get:
0 days, 0 hours, 26 minutes and 59 seconds
I ran this 10 minutes ago, and it gave me 26 minutes 58 seconds.
Is this a bug, or am I just terrible at making time scripts?
The text was updated successfully, but these errors were encountered: