Commit 363ffa95 authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Fix the displayed job creation time

The milliseconds appeared after the time zone:  "10:50:47 A.M. CDT.411"
instead of "10:50:47.411 A.M. CDT".

Force 24-hour format, since it is more convenient for comparing timestamps
near noon.
parent e8caacdc
Pipeline #76154 passed with stage
in 4 minutes and 35 seconds
......@@ -131,14 +131,14 @@ int JobTrackerModel::columnCount(const QModelIndex &parent) const
static QString formatTimeWithMsec(const QTime &time)
{
return QString(QLocale().toString(time) + QStringLiteral(".%1").arg(time.msec(), 3, 10, QLatin1Char('0')));
return time.toString(QStringLiteral("HH:mm:ss.zzz t"));
}
static QString formatDurationWithMsec(qint64 msecs)
{
QTime time(0, 0, 0);
time = time.addMSecs(msecs);
return time.toString(QStringLiteral("hh:mm:ss.zzz"));
return time.toString(QStringLiteral("HH:mm:ss.zzz"));
}
QVariant JobTrackerModel::data(const QModelIndex &idx, int role) const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment