- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    4.8.7, 5.6.1, 5.8.0
- 
    Ubuntu 16.04 64 bit
 Windows 7 64 bit MSVC2013 32 bit
- 
        bcd19b723a4adad4d5f1dbbd35079cc24331dfa8
QTime::fromString allows the format "z" which is documented as: "the milliseconds without leading zeroes (0 to 999)".
If you use this:
#include <QTime> #include <QDebug> int main(int, char *[]) { // six milliseconds, no leading zeros const QTime t = QTime::fromString("6", "z"); qDebug() << t; qDebug() << t.msec() << "milliseconds"; return 0; }
you get the following output:
QTime("00:00:00.600")
600 milliseconds
Instead the correct output would be:
QTime("00:00:00.006")
6 milliseconds
| For Gerrit Dashboard: QTBUG-53565 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 172558,10 | QLocale: fix handling of milliseconds in string format and document | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |