Use earth time since Epoch instead of resetting time after each day

main
sigonasr2 2 years ago
parent 6d1003ad3c
commit 54f7db52a2
  1. 5
      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

Loading…
Cancel
Save