Fixed timestamps... again

This commit is contained in:
Leon Etienne (ubuntu wsl) 2021-01-24 17:46:11 +01:00
parent 53eb62ab8d
commit 95e3d6857b
2 changed files with 7 additions and 2 deletions

View File

@ -105,9 +105,14 @@ export default {
methods: { methods: {
getQueuedDateString: function(unixTime) { getQueuedDateString: function(unixTime) {
return new Date(unixTime*1000).toLocaleDateString("de-DE"); var queuedDate = new Date(unixTime * 1000);
var ret = ('0' + queuedDate.getDate()).slice(-2) + '.' + ('0' + (queuedDate.getMonth()+1)).slice(-2) + '.' + queuedDate.getFullYear();
return ret;
}, },
getDurationString: function(unixTime) { getDurationString: function(unixTime) {
if (unixTime < 0) return "";
else if (unixTime > 360000) return ""; // Something is not right if the video is over 100 hours long
const h = Math.floor(unixTime / 3600); const h = Math.floor(unixTime / 3600);
const m = Math.floor((unixTime % 3600) / 60); const m = Math.floor((unixTime % 3600) / 60);
const s = Math.floor((unixTime % 3600) % 60); const s = Math.floor((unixTime % 3600) % 60);

View File

@ -165,7 +165,7 @@ export default {
data: function() { data: function() {
return { return {
canUpdate: {type: Boolean, default: true}, canUpdate: {type: Boolean, default: true},
version__webUI: 0.75 version__webUI: 0.76
}; };
}, },