mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-08 14:36:13 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user