Time on 'x' axis line chart showing UTC hour/min

17 views
Skip to first unread message

Jason Shave

unread,
Oct 14, 2018, 6:38:32 PM10/14/18
to Google Visualization API
I have a JavaScript function in a web page which is given a UTC date by a .NET web api. The incoming date format is {"2018-10-14T22:19:53.2124123"}. 

I convert the string using "new Date(dateTime)" which gives me a JavaScript date type of {Sun Oct 14 2018 22:19:53 GMT-0600 (Mountain Daylight Time)}.

When I plot these dates on a Google line chart the x-axis shows six hours ahead (given the above example I get: 22:19 as the most recent data point). Should it not consume this date format and render the time local to my browser inside the chart or do I need to perform some kind of conversion?

Reply all
Reply to author
Forward
0 new messages