From c4ca78b8e0d1d10aa86711e400b3b26779a08df8 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Thu, 20 Mar 2025 14:17:22 +0800 Subject: [PATCH] feat: fix last active time formatting to correctly handle timestamps --- src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 199a734..0566325 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -16,7 +16,7 @@ export function formatNezhaInfo(now: number, serverInfo: NezhaServer) { process: serverInfo.state.process_count || 0, up: serverInfo.state.net_out_speed / 1024 / 1024 || 0, down: serverInfo.state.net_in_speed / 1024 / 1024 || 0, - last_active_time_string: lastActiveTime ? dayjs(lastActiveTime * 1000).format("YYYY-MM-DD HH:mm:ss") : "", + last_active_time_string: lastActiveTime ? dayjs(lastActiveTime).format("YYYY-MM-DD HH:mm:ss") : "", online: now - lastActiveTime <= 30000, uptime: serverInfo.state.uptime || 0, version: serverInfo.host.version || null,