Date string parser. Fix build error. Set UTC time spec

This commit is contained in:
Bjørn Erik Jensen
2017-10-05 11:26:21 +02:00
parent d5034d8011
commit a6e2a00122
2 changed files with 7 additions and 5 deletions

View File

@@ -47,7 +47,10 @@ QDateTime RiaDateStringParser::parseDateString(const QString& dateString)
tryParseYearFirst(s, year, month, day) ||
tryParseDayFirst(s, year, month, day);
return parsedOk ? QDateTime(QDate(year, month, day)) : QDateTime();
QDateTime dt;
dt.setTimeSpec(Qt::UTC);
if (parsedOk) dt.setDate(QDate(year, month, day));
return dt;
}
//--------------------------------------------------------------------------------------------------