mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-04 00:30:27 +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;
|
||||
}
|
||||
|
||||
// Ensure date like format YYYY/MM/DD - otherwise results will be 1 day off
|
||||
const dateStr: string = result[key].split("T")[0].replace(/-/g, "/");
|
||||
result[key] = new Date(dateStr);
|
||||
result[key] = new Date(result[key]);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue