Fix: QDateTime::fromString()

This commit is contained in:
Siegfried Siegert 2023-05-12 14:10:16 +02:00
parent 2599513ef9
commit 1e2f1589ac
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -233,7 +233,7 @@ CalcState CALCULATE_LIBRARY_API compute_duration_for_parking_ticket(
duration = calculator.GetDurationFromCost(tariff, PaymentOption::Option1,
cs.toLocal8Bit().constData(),
price, false, true).c_str();
QDateTime d = QDateTime::fromString(duration);
QDateTime d = QDateTime::fromString(duration, Qt::ISODate);
if (!d.isValid()) {
calcState.setDesc(QString("ticketEndTime=%1").arg(duration));
return calcState.set(CalcState::State::WRONG_ISO_TIME_FORMAT);