Fix milestone tooltip date discrepancy

From @felipe_artur in gitlab-org/gitlab-ee!7485:

I spotted a discrepancy on burndown date tooltip. It is showing one day before the milestone start date. I believe it is respecting the timezone.

For example when rendering the burndown for the data below:

["2018-09-22", 15, 63],
["2018-09-23", 13, 53],
["2018-09-24", 10, 44],
["2018-09-25", 7, 29],
["2018-09-26", 5, 21],
["2018-09-27", 4, 16],
["2018-09-28", 3, 11],
["2018-09-29", 2, 4],
["2018-09-30", 1, 0]]

It shows like:

Screenshot_at_2018-10-01_18_51_28

So the data only starts at 2018-09-21 but the tooltip is showing 2018-09-20 at the beginning.

@mikegreiling I remember we worked on this together. Is this correct? Is there an easy fix for it?

As suggested above I think it does have something to do with time-of-day and timezone calculations. You can see looking at the ticks in the graph that the start of the graph is in the middle of the day between the 20th and 21st. It should be directly aligned with the day. Timezone should be irrelevant as we only have date data to work with.

Assignee Loading
Time tracking Loading