Fixed HRV CSV import from Android Hrv4Training on DST

DateTime with 0 hr is not valid when the time is advanced,
changed to check only the date. Reported by Potuz at the forum.
This commit is contained in:
Alejandro Martinez
2017-10-27 20:07:26 -03:00
parent 038860a4ec
commit 0ff2a3088c

View File

@@ -127,7 +127,7 @@ HrvMeasuresCsvImport::getHrvMeasures(QString &error, QDateTime from, QDateTime t
} else if (!tsExists && h == "date") {
// parse date (HRV4Training for Android)
m.when = QDateTime(QDate::fromString(i, "yyyy-dd-MM"));
if (m.when.isValid()) {
if (m.when.date().isValid()) {
// skip line if not in date range
if (m.when < from || m.when > to) {
m.when = QDateTime::fromMSecsSinceEpoch(0);