RideImport

... in addition to DateTime in the .json File name (which is in local Time), also check for duplicates using UTC from RideCache to avoid duplicate imports if user changes his PC TimeZone (e.g. when travelling)
... the problem e.g. occurs in Autoimport where the same files would be imported again, if the PC TimeZone changes
This commit is contained in:
Joern
2017-02-13 17:43:43 +00:00
parent 90211801fb
commit dd88dd909d
3 changed files with 18 additions and 0 deletions

View File

@@ -843,6 +843,17 @@ RideCache::getRide(QString filename)
return NULL;
}
RideItem *
RideCache::getRide(QDateTime dateTime)
{
foreach(RideItem *item, rides())
if (item->dateTime == dateTime)
return item;
return NULL;
}
QHash<QString,int>
RideCache::getRankedValues(QString field)
{