Cabana: Fix >1 hour route time displaying (#29226)

fix greater than 1 hour
old-commit-hash: a90f6d9163
beeps
Justin Newberry 2 years ago committed by GitHub
parent d78ebfdc45
commit 4e4e1d4e9e
  1. 2
      tools/cabana/util.h

@ -97,7 +97,7 @@ namespace utils {
QPixmap icon(const QString &id);
void setTheme(int theme);
inline QString formatSeconds(int seconds) {
return QDateTime::fromTime_t(seconds).toString(seconds > 60 * 60 ? "hh:mm:ss" : "mm:ss");
return QDateTime::fromSecsSinceEpoch(seconds, Qt::UTC).toString(seconds > 60 * 60 ? "hh:mm:ss" : "mm:ss");
}
}

Loading…
Cancel
Save