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

Timeseries showing wrong data for dates with different time zones #38

Open
arcataroger opened this issue May 3, 2022 · 1 comment
Open

Comments

@arcataroger
Copy link

arcataroger commented May 3, 2022

Demo: https://fusioncharts-dst-bug.vercel.app/
Minimal reproducible example: https://github.com/arcataroger/fusioncharts-dst-bug/blob/master/src/App.js

Issue Description

image

When a timeseries chart shows daily data points with no time zones specified (the graph labeled "Chart of expected results"), everything seems to work right.

However, if the data includes time zones different from the current browser time, the values and dates seem to become misaligned.

This can happen, for example, when:

  • The dataset includes time zones different from the browser time (e.g., browser is in PST but dataset includes CST timestamps)
  • The dataset includes two or more time zones, one of which is different from browser time (e.g. browser time is in Pacific Daylight Time, but half the data points are in Pacific Standard Time)
  • The above are combined

Steps to reproduce

Make a timeseries chart with the following dataset:

Data:

[
    ["2022-03-11T00:00:00-08:00", 53.1814],
    ["2022-03-12T00:00:00-08:00", 50.7],
    ["2022-03-13T00:00:00-08:00", 50.2547],
    ["2022-03-14T00:00:00-07:00", 62.9599],
    ["2022-03-15T00:00:00-07:00", 70.7427],
    ["2022-03-16T00:00:00-07:00", 65.3493]
]

Schema:

let schema = [
    {
        name: "Time",
        type: "date",
        format: "%Y-%m-%dT%H:%M:%S%Z"
    },
    {
        name: "Value",
        type: "number"
    }
]
@arcataroger
Copy link
Author

This issue concerns 3.18, but it may be related to a similar issue in 3.16. In that version, the display will be incorrect even if the time zone is stripped from the chart data.

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

No branches or pull requests

1 participant