From e12e0ccd844d9cfa96b9b26e68e8533e549befc4 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 26 May 2025 01:20:28 +0300 Subject: [PATCH] Support ISO 8601 timestamps --- public/scripts/utils.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/scripts/utils.js b/public/scripts/utils.js index 6f13a9794..5aa0873bb 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -982,6 +982,11 @@ function parseTimestamp(timestamp) { return new Date(unixTime).toISOString(); } + // ISO 8601 + if (moment(timestamp, moment.ISO_8601, true).isValid()) { + return timestamp; + } + let dtFmt = []; // meridiem-based format @@ -1008,6 +1013,7 @@ function parseTimestamp(timestamp) { if (!rgxMatch) continue; return x.callback(...rgxMatch); } + return; }