Date filtering off by 1 day
Bug Report
Trying to filter by date doesn't really work. It is off by 1 day.
Steps to Reproduce:
- Setup perspective table with date field in shema:
import { worker } from "https://cdn.jsdelivr.net/npm/@finos/[email protected]/dist/cdn/perspective.min.js";
const PERSPECTIVE_CONFIG = {
types: {
date: {
filter_operator: "==",
aggregate: "count",
format: { dateStyle: "short" },
null_value: -1
},
}
};
const worker_ = worker(PERSPECTIVE_CONFIG);
const table = await worker_.table(schema);
table.update(data);
- filter by date as shown in picture above.
Expected Result:
Should return results with dates 10/23/2022.
Actual Result:
Returns rows with data 10/22/2022.
Environment:
- @finos/[email protected]
- mac m1: ventura
Hi. This looks interesting and I'd like to work on it. I am still trying to navigate Perspective, but it looks as if the code provided above is incomplete (eg. schema and data are not defined). Can I be directed to a useful resource or shown where to look to resolve this? I'd appreciate it.
You'll need to load your own data to repro, anything with a date column (for example - superstore demo). I reckon the issue lies here, as it does not take into account the browser's local time zone ala here.
We'll need tests for this as well.
Alright. Thank you for the response @texodus