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

useUTC - DST Problem #2

Open
DragonflyNet67 opened this issue Mar 30, 2017 · 1 comment
Open

useUTC - DST Problem #2

DragonflyNet67 opened this issue Mar 30, 2017 · 1 comment

Comments

@DragonflyNet67
Copy link

On Line 47 (value = value + new Date().getTimezoneOffset() * 60 * 1000;) there is a problem with/on DST. Let's say in Europe we have March, 30th, 2017 and useUTC is set to false in Highcharts Settings and I want to switch the from/to Dates to 2017-01-01 / 2017-01-31 then both Dates are wrong by one or so hour. That means I get 2016-12-31 23:00 to 2017-01-30 23:00 as a result from the Plugin. Because now in March DST is active and it was not in January

highstock-beyond-extremes

@DragonflyNet67
Copy link
Author

I probably found a solution, but please could you verify this, since i am quite new to javascript.
I added on line 44 following: var dat = new Date(value); and changed the line 47 to
value = value + dat.getTimezoneOffset() * 60 * 1000. For the moment I think it seems to work. For any "strange" reason the minutes are not zero.

highstock-beyond-extremes2

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