Display local date of git HEAD

7a84563add2810c8db284f80160df2ce45533a20

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

1 files changed, +4 -2Showing whitespace changes
src/server-main.js+4 -2
@@ -264,8 +264,10 @@ async function preSetupTasks() {
264 // Print formatted header264 // Print formatted header
265 console.log();265 console.log();
266 console.log(`SillyTavern ${version.pkgVersion}`);266 console.log(`SillyTavern ${version.pkgVersion}`);
267 if (version.gitBranch) {267 if (version.gitBranch && version.commitDate) {
268 console.log(`Running '${version.gitBranch}' (${version.gitRevision}) - ${version.commitDate}`);268 const date = new Date(version.commitDate);
269 const localDate = date.toLocaleString('en-US');
270 console.log(`Running '${version.gitBranch}' (${version.gitRevision}) - ${localDate}`);
269 if (!version.isLatest && ['staging', 'release'].includes(version.gitBranch)) {271 if (!version.isLatest && ['staging', 'release'].includes(version.gitBranch)) {
270 console.log('INFO: Currently not on the latest commit.');272 console.log('INFO: Currently not on the latest commit.');
271 console.log(' Run \'git pull\' to update. If you have any merge conflicts, run \'git reset --hard\' and \'git pull\' to reset your branch.');273 console.log(' Run \'git pull\' to update. If you have any merge conflicts, run \'git reset --hard\' and \'git pull\' to reset your branch.');