highcharts

Highcharts tooltip uses UTC datetime but x-axis uses local datetime?


I'm using the latest version of Highcharts with a datetime x-axis. Datetime values are provided as UNIX timestamps in milliseconds.

Datetimes on the x-axis are correctly displayed using my local timezone (UTC+2) but dates inside the tooltips are being shown in UTC time.

Is there anyway to solve this issue without using a custom formatter? Thanks. 1 2 3


Solution

  • You can define a global timezone to get the correct results, please see the link to API, where you can see a demo in action: https://api.highcharts.com/highcharts/time.timezone