Merge branch 'master' of git.mimbach49.de:GerhardHoffmann/MOBILISIS-Calculator
This commit is contained in:
commit
31df676b57
@ -266,11 +266,19 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, uint8_t payment_
|
||||
cout << "Total minutes: " << (int)ret_val << endl;
|
||||
if (ret_val <= 0) return "PARKING NOT ALLOWED";
|
||||
|
||||
struct tm valid_until_datetime = *localtime(&valid_until_datetime_t);
|
||||
LOG_DEBUG("Ticket is valid until ", asctime(&valid_until_datetime));
|
||||
struct tm valid_until_datetime = *localtime(&valid_until_datetime_t);
|
||||
// TEST: no daylight saving time
|
||||
// valid_until_datetime.tm_isdst = 0;
|
||||
|
||||
char buf[128];
|
||||
memset(buf, 0x00, sizeof(buf));
|
||||
strftime(buf, sizeof(buf)-1, "%Y-%m-%dT%H:%M:%S", &valid_until_datetime);
|
||||
|
||||
// LOG_DEBUG("Ticket is valid until ", asctime(&valid_until_datetime));
|
||||
LOG_DEBUG("Ticket is valid until ", buf);
|
||||
|
||||
total_duration_min = 0.0f;
|
||||
return asctime(&valid_until_datetime);
|
||||
return std::string(buf);
|
||||
}
|
||||
|
||||
///////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user