fixes #13 for time > 24h
This commit is contained in:
parent
d2bccb737e
commit
abea5d8660
@ -153,10 +153,12 @@
|
|||||||
this.$socket.sendObj('post_printer_print_cancel', { }, 'setLoadingPrintCancel');
|
this.$socket.sendObj('post_printer_print_cancel', { }, 'setLoadingPrintCancel');
|
||||||
},
|
},
|
||||||
formatTime(seconds) {
|
formatTime(seconds) {
|
||||||
let date = new Date(null);
|
let h = Math.floor(seconds / 3600);
|
||||||
date.setSeconds(seconds);
|
seconds %= 3600;
|
||||||
|
let m = Math.floor(seconds / 60);
|
||||||
|
let s = seconds % 60;
|
||||||
|
|
||||||
return date.toISOString().substr(11,8);
|
return h+':'+m+':'+s;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user