diff --git a/client/src/pages/Home/components/TestArea/TestAreaComponent.jsx b/client/src/pages/Home/components/TestArea/TestAreaComponent.jsx index 15a85afb..76bca9dc 100644 --- a/client/src/pages/Home/components/TestArea/TestAreaComponent.jsx +++ b/client/src/pages/Home/components/TestArea/TestAreaComponent.jsx @@ -17,7 +17,9 @@ function TestArea() { return (
{speedtests.map ? speedtests.map(test => { - let date = new Date(Date.parse(test.created)); + const dateArray = test.created.split("-").map((value) => parseInt(value)); + const date = test.type === "average" ? new Date(dateArray[0], dateArray[1] - 1, dateArray[2]) + : new Date(Date.parse(test.created)); let item = localStorage.getItem("testTime"); if ((item === "3" || item === "4") && test.type !== "average") return;