Skip to content

Commit

Permalink
Use ISO8601 date format for Dashboard (fixes #933) (#935)
Browse files Browse the repository at this point in the history
  • Loading branch information
djjuhasz authored May 6, 2024
1 parent c1e6758 commit 3102539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ declare module "@vue/runtime-core" {
app.config.globalProperties.$filters = {
formatDateTimeString(value: string) {
const date = new Date(value);
return date.toLocaleString();
return moment(String(date)).format("YYYY-MM-DD HH:mm:ss");
},
formatDateTime(value: Date | undefined) {
if (!value) {
return "";
}
return value.toLocaleString();
return moment(String(value)).format("YYYY-MM-DD HH:mm:ss");
},
formatDuration(from: Date, to: Date) {
const diff = moment(to).diff(from);
Expand Down

0 comments on commit 3102539

Please sign in to comment.