Fix: Check if endTime is still on the same day.
This commit is contained in:
		@@ -649,8 +649,10 @@ CalcState Calculator::isParkingAllowedForWeekDay(Configuration const *cfg,
 | 
			
		||||
                    QTime const &startTime = start.time();
 | 
			
		||||
 | 
			
		||||
                    if (startTime >= from && startTime <= until) {
 | 
			
		||||
                        QTime const endTime = start.addSecs(netto_parking_time*60).time();
 | 
			
		||||
                        if (endTime <= until) {
 | 
			
		||||
                        QDateTime const end = start.addSecs(netto_parking_time*60);
 | 
			
		||||
                        QTime const endTime = end.time();
 | 
			
		||||
                        if (endTime <= until && start.date().dayOfWeek() == end.date().dayOfWeek()) {
 | 
			
		||||
                            qCritical() << DBG_HEADER;
 | 
			
		||||
                            return CalcState(CalcState::State::SUCCESS, "PARKING_ALLOWED", from, until);
 | 
			
		||||
                        } else {
 | 
			
		||||
                            errorStr = QString("%1 startTime not in range (%2 not in [%3, %4))")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user