summaryrefslogtreecommitdiffstats
path: root/core/gpslocation.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-12-25 18:53:43 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2017-12-25 19:47:57 +0100
commit37e98a8d89d8e8affc1a12e92f8359d66183caad (patch)
treea88f05fa7baffb016d86f1dbe227b72d5a2f0a96 /core/gpslocation.cpp
parentca38644005bbb91d5bc05be4d571b4082563c5f2 (diff)
downloadsubsurface-37e98a8d89d8e8affc1a12e92f8359d66183caad.tar.gz
Use correct date format
A very very trival fix, for a mysterious issue. When loading GPS fix data from the server, the string date was parsed with the format "yyy-M-d". And no, the "yyy" is no typo here, but was the reason that data from the read from server got a 1/1/1970 data. And when a user decided to upload that data to the server again, we ended up with 2 copies of the GPS fix. One with correct data (as originally saved), and one new with the bogus date. In order to het rid of those weird 1/1/1970 GPS fixes, users will have to remove them by hand. Fixes: #567 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'core/gpslocation.cpp')
-rw-r--r--core/gpslocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp
index 9db829b02..ccf183adc 100644
--- a/core/gpslocation.cpp
+++ b/core/gpslocation.cpp
@@ -601,7 +601,7 @@ void GpsLocation::downloadFromServer()
qDebug() << downloadedFixes.count() << "GPS fixes downloaded";
for (int i = 0; i < downloadedFixes.count(); i++) {
QJsonObject fix = downloadedFixes[i].toObject();
- QDate date = QDate::fromString(fix.value("date").toString(), "yyy-M-d");
+ QDate date = QDate::fromString(fix.value("date").toString(), "yyyy-M-d");
QTime time = QTime::fromString(fix.value("time").toString(), "hh:m:s");
QString name = fix.value("name").toString();
QString latitude = fix.value("latitude").toString();