Added check for NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM:
08:00 <= currentTime <= 20:00.
This commit is contained in:
parent
3ad2c77467
commit
87b14ee3f8
@ -91,7 +91,18 @@ int CALCULATE_LIBRARY_API compute_product_price(Configuration const *cfg, PERMIT
|
||||
QVector<ATBTariffProduct> product = products.value();
|
||||
if (product.size() > 0) {
|
||||
ATBTariffProduct const &p = product[0];
|
||||
QTime const ¤tTime = QDateTime::currentDateTime().time();
|
||||
|
||||
if (p.m_tariff_product_start <= currentTime && currentTime <= p.m_tariff_product_end) {
|
||||
return p.m_tariff_product_price;
|
||||
} else {
|
||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ")"
|
||||
<< "ERROR currentTime"
|
||||
<< currentTime.toString(Qt::ISODate)
|
||||
<< "INVALID ("
|
||||
<< p.m_tariff_product_start.toString(Qt::ISODate)
|
||||
<< p.m_tariff_product_end.toString(Qt::ISODate) << ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
Loading…
Reference in New Issue
Block a user