chore: use Intl for date formatting (#3588)

* chore: use `Intl` for date formatting

* fix: show last traffic reset

* chore: use raw timestamps

* fix: remove unnecessary import
This commit is contained in:
Danil S.
2025-12-04 05:37:27 +07:00
committed by GitHub
parent e8c509c720
commit 70f6d6b21a
9 changed files with 57 additions and 278 deletions

View File

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