Support ISO 8601 timestamps

e12e0ccd844d9cfa96b9b26e68e8533e549befc4

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +6 -0Showing whitespace changes
public/scripts/utils.js+6 -0
@@ -982,6 +982,11 @@ function parseTimestamp(timestamp) {
982 return new Date(unixTime).toISOString();982 return new Date(unixTime).toISOString();
983 }983 }
984984
985 // ISO 8601
986 if (moment(timestamp, moment.ISO_8601, true).isValid()) {
987 return timestamp;
988 }
989
985 let dtFmt = [];990 let dtFmt = [];
986991
987 // meridiem-based format992 // meridiem-based format
@@ -1008,6 +1013,7 @@ function parseTimestamp(timestamp) {
1008 if (!rgxMatch) continue;1013 if (!rgxMatch) continue;
1009 return x.callback(...rgxMatch);1014 return x.callback(...rgxMatch);
1010 }1015 }
1016
1011 return;1017 return;
1012}1018}
10131019