mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T308, using an optimized (faster) function for YYYYmmdd string parsing
Ref T309, found that QDateTime::fromString returns a QDateTime object with local timestamp. Using a optimized version returns UTC objects now. - The bug was found writing a unit test for Ref T308 - Slack: https://swift-project.slack.com/archives/G7GD2UP9C/p1534848725000100
This commit is contained in:
@@ -344,8 +344,7 @@ namespace BlackCore
|
||||
const QStringList updateParts = currentLine.replace(" ", "").split('=');
|
||||
if (updateParts.length() < 2) break;
|
||||
const QString dts = updateParts.at(1).trimmed();
|
||||
updateTimestampFromFile = QDateTime::fromString(dts, "yyyyMMddHHmmss");
|
||||
updateTimestampFromFile.setOffsetFromUtc(0);
|
||||
updateTimestampFromFile = fromStringUtc(dts, "yyyyMMddHHmmss");
|
||||
const bool alreadyRead = (updateTimestampFromFile == this->getUpdateTimestamp());
|
||||
if (alreadyRead)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user