Skip to content

Commit

Permalink
fixes #31 pretend that gpx is in local timezone to be aligned with re…
Browse files Browse the repository at this point in the history
…st of application
  • Loading branch information
jmlich committed Dec 17, 2021
1 parent 7ff845b commit 2f72036
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gpspoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/

#include <QDebug>
#include <QDateTime>
#include "gpspoint.h"

GpsPoint::GpsPoint() {
Expand All @@ -13,6 +14,7 @@ GpsPoint::GpsPoint() {

void GpsPoint::setTime(QString time_str) {
QDateTime dt = QDateTime::fromString(time_str, Qt::ISODate);
dt.setTimeSpec(Qt::LocalTime); // TODO fix working with time zones and remove this ugly hack
if(dt.isValid()) {
*dateTime = dt;
} else {
Expand Down

0 comments on commit 2f72036

Please sign in to comment.