Interval time tweak

.. time_to_string is for formatting durations, so it will
   use as few characters as possible (e.g 10s, 1:00).

   since the interval time is a time of day we want the
   full hh:mm:ss format.
This commit is contained in:
Mark Liversedge
2021-09-14 09:17:07 +01:00
parent ea26efc44a
commit 6236611aee

View File

@@ -4692,9 +4692,9 @@ Result Leaf::eval(DataFilterRuntime *df, Leaf *leaf, const Result &x, long it, R
if(symbol == "date") {
value= QDate(1900,01,01).daysTo(ride->dateTime.date());
if (wantstrings) asstring = ride->dateTime.date().toString("dd MMM yyyy");
} else if(symbol == "time") {
} else if(symbol == "time") {
value= QTime(0,0,0).secsTo(ride->dateTime.time().addSecs(ii->start));
if (wantstrings) asstring = time_to_string(value);
if (wantstrings) asstring = ride->dateTime.time().addSecs(ii->start).toString("hh:mm:ss");
} else if(symbol == "filename") {
asstring = ride->fileName;
} else if(symbol == "name") {