Skip to content

Commit 8348f53

Browse files
committed
Updated the speedtests.js controller to use ISO labels instead of locale
1 parent dac6036 commit 8348f53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/controller/speedtests.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports.listAverage = async (days) => {
7171
time: Math.round(avgNumbers["time"]),
7272
type: "average",
7373
amount: currentDay.length,
74-
created: created.getFullYear() + "-" + (created.getMonth() + 1) + "-" + created.getDate()
74+
created: created.toISOString()
7575
});
7676
}
7777

@@ -124,8 +124,8 @@ module.exports.listStatistics = async (days) => {
124124
upload: mapFixed(notFailed, "upload"),
125125
time: mapRounded(notFailed, "time"),
126126
data,
127-
labels: days >= 3 ? avgEntries.map((entry) => new Date(entry.created).toLocaleDateString())
128-
: notFailed.map((entry) => new Date(entry.created).toLocaleTimeString([], {hour: "2-digit", minute: "2-digit"}))
127+
labels: days >= 3 ? avgEntries.map((entry) => new Date(entry.created).toISOString())
128+
: notFailed.map((entry) => new Date(entry.created).toISOString())
129129
};
130130
}
131131

0 commit comments

Comments
 (0)