mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 08:40:28 +00:00
fix incorrect date-time parsing logic
This commit is contained in:
parent
a5d4a6248c
commit
f0ea1783ac
1 changed files with 1 additions and 3 deletions
|
@ -26,9 +26,7 @@ export function parseDate<T>(obj: T, keys: Array<keyof T> = []): T {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure date like format YYYY/MM/DD - otherwise results will be 1 day off
|
result[key] = new Date(result[key]);
|
||||||
const dateStr: string = result[key].split("T")[0].replace(/-/g, "/");
|
|
||||||
result[key] = new Date(dateStr);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue