Mercurial > trustbridge
diff ui/certificatelist.cpp @ 472:cf25bb040186
Change date format to ISO as specificed for the certificate list
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 23 Apr 2014 16:53:28 +0000 |
parents | 17e1c8f37d72 |
children |
line wrap: on
line diff
--- a/ui/certificatelist.cpp Wed Apr 23 16:34:46 2014 +0000 +++ b/ui/certificatelist.cpp Wed Apr 23 16:53:28 2014 +0000 @@ -47,18 +47,13 @@ return mStatus; } } else if (curLine.startsWith("D:")) { - bool ok = false; - qlonglong timestamp = 0; - curLine.remove(0, 2); - timestamp = curLine.toLongLong(&ok); - if (!ok) { - qDebug() << "Invalid Date"; + mDate = QDateTime::fromString(curLine, Qt::ISODate); + if (!mDate.isValid()) { + qDebug() << "Invalid Date: " << curLine; mStatus = InvalidFormat; return mStatus; } - - mDate = QDateTime::fromMSecsSinceEpoch(timestamp * 1000); } else if (curLine.startsWith("I:")) { mCertificates << Certificate(curLine); } else if (curLine.startsWith("R:")) {