4

In my Python

  2020-09-23T10:50:46.838023 

In JavaScript

  2020-09-23T10:50:46.838023

In JavaScript apexcharts format

  2020-09-23T03:50:46.838023

why has it changed the hour from 10 to 03?

This my Vue code

chartOptions: {
              chart: {
                id: "chart" + key,
                type: obj.chart,
                zoom: {
                  enabled: false,
                },
              },
              tooltip: {
                x: {
                  format: 'dd/MMM HH:mm:ss',
                }
              },
              xaxis: {
                type: "datetime",
                categories: obj.time,
                labels: {
                  show: true
                }
              },
            },
          };

My obj is object used for foreach loop.

tripleee
  • 175,061
  • 34
  • 275
  • 318
user14324808
  • 43
  • 1
  • 6
  • What timezone are you in? GMT+7 is my bet. So this apexcharts is showing GMT, everything else is showing your local timezone – Jaromanda X Sep 23 '20 at 03:59
  • I should change timezone in apexcharts or something else ? – user14324808 Sep 23 '20 at 04:02
  • no idea what apexcharts is, sorry, I'm just telling you where the 7 hours difference is - the difference may be due to your code or apexcharts code, I don't know as you've shown no code, and apexcharts is not something I know – Jaromanda X Sep 23 '20 at 04:05

1 Answers1

10

If you want to display local time in ApexCharts, turn off the UTC flag on x-axis labels.

xaxis: {
  labels: {
    datetimeUTC: false
  }
}
junedchhipa
  • 4,694
  • 1
  • 28
  • 28