From 46c31ae7d733e175f4a4d7070f621612f8a3badc Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Thu, 26 Jun 2025 00:00:56 +0800 Subject: [PATCH] update html --- html/js/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/html/js/main.js b/html/js/main.js index de2c636..035ce1d 100644 --- a/html/js/main.js +++ b/html/js/main.js @@ -312,7 +312,13 @@ function handleNotify(value, idx) { updateDitcherOptions(); } else { if (textDecoder == null) textDecoder = new TextDecoder(); - addLog(textDecoder.decode(data), '⇓'); + const msg = textDecoder.decode(data); + addLog(msg, '⇓'); + if (msg.startsWith('t=') && msg.length > 2) { + const t = parseInt(msg.substring(2)) + new Date().getTimezoneOffset() * 60; + addLog(`远端时间: ${new Date(t * 1000).toLocaleString()}`); + addLog(`本地时间: ${new Date().toLocaleString()}`); + } } }