fix: parse logger time

This commit is contained in:
GyDi 2022-11-23 17:45:43 +08:00
parent 06dabf1e4e
commit 33b1a11d85
No known key found for this signature in database
GPG Key ID: 9C3AD40F1F99880A

View File

@ -1,3 +1,4 @@
import dayjs from "dayjs";
import { invoke } from "@tauri-apps/api/tauri";
import { Notice } from "@/components/base";
@ -10,7 +11,8 @@ export async function getClashLogs() {
.map((log) => {
const result = log.match(regex);
if (result) {
const [_, time, type, payload] = result;
const [_, _time, type, payload] = result;
const time = dayjs(_time).format("MM-DD HH:mm:ss");
return { time, type, payload };
}