From 54f7db52a2f47b44130f9018c0a8d639eea34f8c Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Tue, 30 May 2023 00:05:31 -0500 Subject: [PATCH] Use earth time since Epoch instead of resetting time after each day --- src/App.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index 43cc764..b81de94 100755 --- a/src/App.js +++ b/src/App.js @@ -697,9 +697,8 @@ function App() { const interval = setInterval(()=>{ if (nav==="main"){ var date=new Date() - var earthH=date.getHours(),earthM=date.getMinutes(),earthS=date.getSeconds() - var earthTime=Number(earthH)*3600+Number(earthM)*60+Number(earthS) - var eorzeanTime=earthTime*20.571428571428571428571428571429+49380 + var earthTime=Math.round(Date.now()/1000) + var eorzeanTime=earthTime*20.571428571428571428571428571429 var eorzeanH=Math.floor(eorzeanTime/3600)%24 var eorzeanM=Math.floor(eorzeanTime/60)%60 var eorzeanS=Math.floor(eorzeanTime)%60