fix: the invalid data time in comments.

This commit is contained in:
Yufan Sheng 2024-07-08 21:48:56 +08:00
parent 96305b230a
commit 8d207f4968
Signed by: syhily
GPG Key ID: DEB186763C308C31

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);
}; };