1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

support more timestamp formats (#405)

This commit is contained in:
Raphael Piccolo
2020-04-27 21:03:51 +02:00
committed by GitHub
parent 00c143a8c8
commit d794ca1c7f
2 changed files with 21 additions and 3 deletions

View File

@@ -10,9 +10,10 @@ import debounce from "lodash.debounce";
import InfiniteLoader from "./InfiniteLoader";
function parseMessage(data) {
const date = new Date(data.substring(0, 30));
const key = data.substring(0, 30);
const message = data.substring(30).trim();
const i = data.indexOf(' ');
const key = data.substring(0, i);
const date = new Date(key);
const message = data.substring(i).trim();
return {
key,
date,