fix: the invalid data time in comments.

This commit is contained in:
Yufan Sheng 2024-07-08 21:48:56 +08:00
parent 335a28f06d
commit 02e49f9230
Signed by: syhily
GPG Key ID: 9D18A22A7DCD5A9B

View File

@ -63,8 +63,5 @@ export const formatShowDate = (date: Date) => {
export const formatLocalDate = (source: string) => { export const formatLocalDate = (source: string) => {
const date = new Date(source); const date = new Date(source);
return DateTime.fromJSDate(date) return DateTime.fromJSDate(date).setLocale(options.settings.locale).toFormat(options.settings.timeFormat);
.setZone(options.settings.timeZone)
.setLocale(options.settings.locale)
.toFormat(options.settings.timeFormat);
}; };