mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ca38644005
commit
37e98a8d89
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue