Updated ET display
This commit is contained in:
parent
3b25783304
commit
6d1003ad3c
10
src/App.js
10
src/App.js
@ -540,11 +540,11 @@ function TimerDisplay(p){
|
||||
const {timer,eorzeanTime} = p
|
||||
var eorzeanSeconds=Number(eorzeanTime.split(":")[0])*3600+Number(eorzeanTime.split(":")[1])*60
|
||||
return <><Row>
|
||||
<Col>
|
||||
<Col sm={8}>
|
||||
<img src={"https://xivapi.com"+timer.icon}/> {timer.name} <sub><i style={{color:"gray"}}>{eorzeanSeconds>timer.actual_seconds&&eorzeanSeconds<timer.end_seconds?"Node Available: "+TimeDisplay(timer.end_seconds-eorzeanSeconds):TimeDisplay((eorzeanSeconds>timer.actual_seconds)?timer.actual_seconds+86400-eorzeanSeconds:timer.actual_seconds-eorzeanSeconds)}</i></sub>
|
||||
</Col>
|
||||
<Col>
|
||||
<span style={{float:"right"}}>{timer.timer_start} - {timer.timer_end}</span>
|
||||
<Col sm={4}>
|
||||
<span style={{position:"relative",top:"12px",float:"right"}}>{timer.timer_start} - {timer.timer_end}</span>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
@ -698,8 +698,8 @@ function App() {
|
||||
if (nav==="main"){
|
||||
var date=new Date()
|
||||
var earthH=date.getHours(),earthM=date.getMinutes(),earthS=date.getSeconds()
|
||||
var earthTime=earthH*3600+earthM*60+earthS
|
||||
var eorzeanTime=earthTime*20.571428571428571428571428571429
|
||||
var earthTime=Number(earthH)*3600+Number(earthM)*60+Number(earthS)
|
||||
var eorzeanTime=earthTime*20.571428571428571428571428571429+49380
|
||||
var eorzeanH=Math.floor(eorzeanTime/3600)%24
|
||||
var eorzeanM=Math.floor(eorzeanTime/60)%60
|
||||
var eorzeanS=Math.floor(eorzeanTime)%60
|
||||
|
Loading…
x
Reference in New Issue
Block a user