mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T308, loading JSON from DB optimizations
- info about time consumed for parsing (so we can benchmark) - using the "optimized" YYYYmmdd parsing
This commit is contained in:
@@ -63,17 +63,8 @@ namespace BlackMisc
|
||||
|
||||
QDateTime CDatastoreUtility::parseTimestamp(const QString ×tamp)
|
||||
{
|
||||
if (!timestamp.isEmpty())
|
||||
{
|
||||
const QString ts(timestamp.trimmed().remove(' ').remove('-').remove(':')); // normalize
|
||||
QDateTime dt = QDateTime::fromString(ts, "yyyyMMddHHmmss");
|
||||
dt.setTimeZone(QTimeZone::utc());
|
||||
return dt;
|
||||
}
|
||||
else
|
||||
{
|
||||
return QDateTime();
|
||||
}
|
||||
if (timestamp.isEmpty()) { return QDateTime(); }
|
||||
return parseDateTimeStringOptimized(removeDateTimeSeparators(timestamp));
|
||||
}
|
||||
|
||||
bool CDatastoreUtility::parseSwiftPublishResponse(const QString &jsonResponse, CAircraftModelList &publishedModels, CAircraftModelList &skippedModels, CStatusMessageList &messages, bool &directWrite)
|
||||
|
||||
Reference in New Issue
Block a user