1
0
forked from bot/app

Add sign status for Lagrange.Core

This commit is contained in:
2024-05-11 00:34:11 +08:00
parent 205b69e5cb
commit f22f8f772a
2 changed files with 28 additions and 5 deletions

View File

@ -24,7 +24,7 @@ data.forEach((item) => {
},
xAxis: {
type: 'category',
data: item["times"],
data: item["times"].map(timestampToTime),
},
yAxis: {
type: 'value',
@ -38,4 +38,16 @@ data.forEach((item) => {
]
}
)
})
})
function timestampToTime(timestamp) {
let date = new Date(timestamp * 1000)
let Y = date.getFullYear() + '-'
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
let D = date.getDate() + ' '
let h = date.getHours() + ':'
let m = date.getMinutes() + ':'
let s = date.getSeconds()
return M + D + h + m + s
}