mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Support ISO 8601 timestamps
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user