diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index d85043a..d14eea7 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -849,6 +849,12 @@ CalcState CALCULATE_LIBRARY_API compute_price_for_parking_ticket( return calcState.set(CalcState::State::INVALID_START_DATE); } + if (end_parking_time.time().hour() == 0 && end_parking_time.time().minute() == 0) { + end_parking_time = end_parking_time.addDays(-1); + end_parking_time.setTime(QTime(23, 59, 0)); + } + qCritical() << __func__ << __LINE__ << "end_parking_time" << end_parking_time.toString(Qt::ISODate); + return calcState.set(CalcState::State::SUCCESS); }