1

I'm using QwtDateScaleDraw in Qt to plot a QDateTime at the X-axis of a graph.

I use this command to convert the QDateTime to a QwtDate::Double:

tempData->append( QPointF( QwtDate::toDouble( date.at(var) ), data.at(var) ) );

The first date/time that I have is

01/08/2014 00:00:52

but when I place the data in the graph, the first date is

31/07/2014 21:04:52.

I don't know why this is happening.

Nicolas Holthaus
  • 7,763
  • 4
  • 42
  • 97
KelvinS
  • 2,870
  • 8
  • 34
  • 67

1 Answers1

1

I managed to solve this using:

scaleDraw->setTimeSpec(Qt::UTC);
KelvinS
  • 2,870
  • 8
  • 34
  • 67