-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Chart tooltip is one day back #43
Comments
Yep, I know this issue. It has been introduced in PR #37, but I didn't recognize it before deploying that change and didn't feel like it's that important. I guess it is caused by some timezone problem. Can you tell me in which timezone you tested this behavior? |
In GMT (UTC +1 now) |
looks fixed |
Are you still in UTC+1? Because I haven't changed the calculation, I think. |
Maybe it’s because it’s UTC now... |
That sounds likely. |
I am in Eastern Time, I'm seeing an issue on the default view for a package where the both the "To" field and the date in the graph is always the day before (ie if today is June 2nd, both are June 1st). IMHO it should give data for the current day even if the day is not over. |
npm-stat.com cannot give numbers before a day is over, since NPM starts calculating the numbers on midnight UTC. @vlzhr Yes, everything is fine in the back end, but time zones in JavaScript are awful. Highcharts uses |
looks like this is linked to the issue I just opened #83 where I noticed the timezone moving forwards has caused it to duplicate a date and going back has caused it to skip a date. This results in the graph appearing as above. |
See https://npm-stat.com/charts.html?package=ajv
or https://npm-stat.com/charts.html?package=ajv&from=2017-04-01&to=2017-04-16
Particularly on the second one you can see that the date one the axis is correct and in the tooltip (when you mouse-over the dot on the chart) it is one day back
The text was updated successfully, but these errors were encountered: