Changeset 37e98a8 in subsurface


Ignore:
Timestamp:
Dec 25, 2017, 10:47:57 AM (4 weeks ago)
Author:
Jan Mulder <jlmulder@…>
Branches:
master
Children:
8e9ba7b
Parents:
ca38644
git-author:
Jan Mulder <jlmulder@…> (12/25/17 09:53:43)
git-committer:
Jan Mulder <jlmulder@…> (12/25/17 10:47:57)
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/gpslocation.cpp

    r28ae35e r37e98a8  
    602602                        for (int i = 0; i < downloadedFixes.count(); i++) {
    603603                                QJsonObject fix = downloadedFixes[i].toObject();
    604                                 QDate date = QDate::fromString(fix.value("date").toString(), "yyy-M-d");
     604                                QDate date = QDate::fromString(fix.value("date").toString(), "yyyy-M-d");
    605605                                QTime time = QTime::fromString(fix.value("time").toString(), "hh:m:s");
    606606                                QString name = fix.value("name").toString();
Note: See TracChangeset for help on using the changeset viewer.