1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 06:28:42 +01:00

Fixes bad date

This commit is contained in:
Amir Raminfar
2020-04-27 15:07:04 -07:00
parent e84c9c874b
commit d277b4e878
2 changed files with 4 additions and 12 deletions

View File

@@ -67,19 +67,14 @@ export default {
}
},
parseMessage(data) {
if (this.$route.query.debug) {
console.debug(`Parsing [${data}].`);
let i = data.indexOf(" ");
if (i == -1) {
i = data.length;
}
const i = data.indexOf(" ");
const key = data.substring(0, i);
const date = new Date(key);
const message = data.substring(i).trim();
return {
key,
date,
message,
};
return { key, date, message };
},
},
watch: {