24-hour ticket

This commit is contained in:
Moran Rod 2023-08-22 12:26:52 +02:00
parent 8a7828c1e6
commit 6ea58be34d
3 changed files with 3 additions and 3 deletions

View File

@ -31,5 +31,5 @@ public:
QString GetDailyTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over);
// 24-hour daily ticket
QString Get24HourTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option, bool carry_over);
QString Get24HourTicketDuration(Configuration* cfg, QString start_datetime, uint8_t payment_option);
};

View File

@ -20,7 +20,7 @@ inline struct tm* localtime_r(const time_t *clock, struct tm* result){
}
#endif
QString Calculator::Get24HourTicketDuration(Configuration *cfg, QString start_datetime, uint8_t payment_option, bool carry_over)
QString Calculator::Get24HourTicketDuration(Configuration *cfg, QString start_datetime, uint8_t payment_option)
{
if(start_datetime.isNull() || start_datetime.isEmpty()) return "Invalid date-time";
protection_counter = 0;

View File

@ -33,7 +33,7 @@ int main() {
{
struct price_t price;
memset(&price, 0x00, sizeof(price));
QDateTime start = QDateTime::fromString("2023-06-02T13:03:00.000Z",Qt::ISODate); //QDateTime::currentDateTime();
QDateTime start = QDateTime::fromString("2023-06-01T07:50:00.000Z",Qt::ISODate); //QDateTime::currentDateTime();
time_t start_parking_time = start.toSecsSinceEpoch() / 60;
time_t end_parking_time = start_parking_time + 1230;