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

[Bug]: DateFormat is broken for timezone #582

Open
1 task
yusuf-kh opened this issue Apr 13, 2022 · 0 comments
Open
1 task

[Bug]: DateFormat is broken for timezone #582

yusuf-kh opened this issue Apr 13, 2022 · 0 comments
Labels

Comments

@yusuf-kh
Copy link

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

I am trying to set timezone for the chart using DateFormat to UTC (GMT + 0)

Current behavior:

The timezone of the ticks, which appear as popup on hover changes to UTC but the timezone of the x-axis still is in my local timezone.

Expected behavior:

The timezone of the ticks, which appear as popup on hover & the times on the x-axis have the UTC timezone


I went through the google chart docs, they suggested that instead of passing JS Date Object one should instead use a date-time string, I tried that as well but got the same result.


image

In the screenshot above, the time in tick is 5 AM UTC, whereas the corresponding x-axis point is 10:30 AM, which is my local timezone (IST)

I have provided the sandbox link in the reproduction section for the same.

Reproduction

https://codesandbox.io/s/tender-orla-hlpv8f

react-google-charts version

v4.0.0

Possible solution

No response

@yusuf-kh yusuf-kh added the bug label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant