Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date filtering off by 1 day #2023

Open
rigogsilva opened this issue Nov 29, 2022 · 3 comments
Open

Date filtering off by 1 day #2023

rigogsilva opened this issue Nov 29, 2022 · 3 comments
Labels
bug Concrete, reproducible bugs

Comments

@rigogsilva
Copy link

Bug Report

Trying to filter by date doesn't really work. It is off by 1 day.

Screenshot 2022-11-29 at 3 38 27 PM copy

Steps to Reproduce:

  1. Setup perspective table with date field in shema:
import { worker } from "https://cdn.jsdelivr.net/npm/@finos/perspective@1.7.2/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);
  1. 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/perspective@1.7.2
  • mac m1: ventura
@texodus texodus added the bug Concrete, reproducible bugs label Nov 30, 2022
@dev-navian
Copy link
Contributor

dev-navian commented Apr 19, 2023

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.

@texodus
Copy link
Member

texodus commented Apr 20, 2023

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.

@dev-navian
Copy link
Contributor

dev-navian commented Apr 21, 2023

Alright. Thank you for the response @texodus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

No branches or pull requests

4 participants
@texodus @rigogsilva @dev-navian and others