Fix displayed times in dashboards
This commit is contained in:
parent
bcd3a4db39
commit
42be273a86
3 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@
|
|||
meta: {
|
||||
playtime: {
|
||||
alias: 'Average Session Playtime',
|
||||
formatter: (v) => new Date(v * 1000).toISOString().slice(11, 19)
|
||||
formatter: (v) => Math.floor(v / 3600) > 0 ? `${Math.floor(v / 3600)}h ${Math.floor((v % 3600) / 60)}m` : `${Math.floor((v % 3600) / 60)}m`
|
||||
}
|
||||
},
|
||||
label: {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
meta: {
|
||||
value: {
|
||||
alias: 'Total Playtime',
|
||||
formatter: (v) => new Date(v * 1000).toISOString().slice(11, 19)
|
||||
formatter: (v) => Math.floor(v / 3600) > 0 ? `${Math.floor(v / 3600)}h ${Math.floor((v % 3600) / 60)}m` : `${Math.floor((v % 3600) / 60)}m`
|
||||
}
|
||||
},
|
||||
label: {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
meta: {
|
||||
playtime: {
|
||||
alias: 'Total Playtime',
|
||||
formatter: (v) => new Date(v * 1000).toISOString().slice(11, 19)
|
||||
formatter: (v) => Math.floor(v / 3600) > 0 ? `${Math.floor(v / 3600)}h ${Math.floor((v % 3600) / 60)}m` : `${Math.floor((v % 3600) / 60)}m`
|
||||
}
|
||||
},
|
||||
label: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue