fix: calculate duration correctly in ExecutionView.vue
This commit is contained in:
parent
57390be16f
commit
e0fd10a6ec
|
|
@ -255,7 +255,7 @@ function updateDuration(logEntryParam) {
|
||||||
} else {
|
} else {
|
||||||
let delta = ''
|
let delta = ''
|
||||||
try {
|
try {
|
||||||
delta = (new Date(logEntry.value.datetimeStarted) - new Date(logEntry.value.datetimeStarted)) / 1000
|
delta = (new Date(logEntry.value.datetimeFinished) - new Date(logEntry.value.datetimeStarted)) / 1000
|
||||||
delta = new Intl.RelativeTimeFormat().format(delta, 'seconds').replace('in ', '').replace('ago', '')
|
delta = new Intl.RelativeTimeFormat().format(delta, 'seconds').replace('in ', '').replace('ago', '')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn('Failed to calculate delta', e)
|
console.warn('Failed to calculate delta', e)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue