Unify chat timestamps format (#4806)

* Unify chat timestamps format

* Handle ISO timestamps in stats.js

* Refactor timestamp parsing on server

* Switch to ISO timestamps for character/messages creation dates

* Fix type error

* Early exist in saveGroupChat if group not found

* Remove redundant fields from temp.chat export header

* Auto-fix char creation date format on edit

* Add name to fallback chat file names

* Rename parseTimestamp server side function
This commit is contained in:
Cohee
2025-11-26 15:55:15 +02:00
committed by GitHub
parent b9cea60c02
commit 5993084ee6
12 changed files with 171 additions and 175 deletions
+1 -4
View File
@@ -1028,9 +1028,6 @@ function verifyCharactersSearchSortRule() {
}
}
/** @typedef {object} Character - A character */
/** @typedef {object} Group - A group */
/**
* @typedef {object} Entity - Object representing a display entity
* @property {Character|Group|import('./scripts/tags.js').Tag|*} item - The item
@@ -8248,7 +8245,7 @@ export function select_selected_character(chid, { switchMenu = true } = {}) {
$('#talkativeness_slider').val(characters[chid].talkativeness || talkativeness_default);
$('#mes_example_textarea').val(characters[chid].mes_example);
$('#selected_chat_pole').val(characters[chid].chat);
$('#create_date_pole').val(characters[chid].create_date);
$('#create_date_pole').val(timestampToMoment(characters[chid].create_date).toISOString());
$('#avatar_url_pole').val(characters[chid].avatar);
$('#chat_import_avatar_url').val(characters[chid].avatar);
$('#chat_import_character_name').val(characters[chid].name);