Morteza
Morteza

Reputation: 550

X-axis doesn't show correct time

I'm using "Time data with irregular intervals" chart. xaxis data is in epoch time and it's range is 12:00 PM till 15:00 PM. The problem is that despite time range is from 12:00 PM till 15:00 PM but Highcharts xaxis labels range is 9:00 AM till 12:00 PM, that is completely wrong! What's the problem ? thnx.

Upvotes: 0

Views: 767

Answers (2)

malonso
malonso

Reputation: 2295

Just to clarify, this was a TZ issue as Fildor mentioned. If you want the values to be in UTC, you should specify the following in the options:

Highcharts.setOptions({
global: {
    useUTC: false
}
});

As mentioned here:

Receiving incorrect datetimes when using milliseconds for x-axis?

Upvotes: 1

Fildor
Fildor

Reputation: 16084

Since the timerange (of 3 hours) is ok, I'll take a wild guess and say it's the Timezone. But as JamWaffles says: Without code, we can do nothing but wild guesses.

By the way: what is "15 PM"? I guess you are talking about the timeranges 1200 - 1500 and 0900-1200 or 12 PM - 3 PM and 9 AM - 12 PM

Upvotes: 1

Related Questions