Home Forums StockChart Support Why dates off by one with tooltips in stock charts? Reply To: Why dates off by one with tooltips in stock charts?

#45077

@greg-aharonian,

JavaScript dates may display an incorrect day when passed in ISO format (YYYY-MM-DD), depending on the user’s time zone. According to MDN, date-only formats are interpreted as UTC time, and date-time formats are interpreted as local time when the time zone offset is absent. To avoid this problem, you can use date-time format or use a different date format along with time-zone. Please take a look at this JSFiddle for an example on the same.

Stockchart with date-time Data

Also, refer to this Stack Overflow thread for more information.

—-
Manoj Mohan
Team CanvasJS