Fix: Incorrect time in xray logs (#3587)

* fixed timezone in xray logs

* remove leading / at the address
This commit is contained in:
fgsfds
2025-11-09 04:42:02 +05:00
committed by GitHub
parent cf38226b5d
commit 538f7fd5d7
2 changed files with 7 additions and 5 deletions

View File

@@ -844,9 +844,11 @@
text = `<td>${log.Email}</td>`;
}
const { locale, timeZone } = Intl.DateTimeFormat().resolvedOptions();
formattedLogs += `
<tr ${outboundColor}>
<td><b>${new Date(log.DateTime).toLocaleString()}</b></td>
<td><b>${new Date(log.DateTime).toLocaleString(locale, { timeZone })}</b></td>
<td>${log.FromAddress}</td>
<td>${log.ToAddress}</td>
<td>${log.Inbound}</td>