mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
@@ -46,8 +46,7 @@ namespace BlackMisc
|
||||
QJsonValue IDatastoreObjectWithIntegerKey::getDbKeyAsJsonValue() const
|
||||
{
|
||||
if (this->hasValidDbKey()) { return QJsonValue(this->m_dbKey); }
|
||||
static const QJsonValue null;
|
||||
return null;
|
||||
return QJsonValue();
|
||||
}
|
||||
|
||||
void IDatastoreObjectWithIntegerKey::setKeyAndTimestampFromDatabaseJson(const QJsonObject &json, const QString &prefix)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QTimeZone>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
@@ -56,6 +57,7 @@ namespace BlackMisc
|
||||
{
|
||||
QString ts(timestamp.trimmed().remove(' ').remove('-').remove(':')); // normalize
|
||||
QDateTime dt = QDateTime::fromString(ts, "yyyyMMddHHmmss");
|
||||
dt.setTimeZone(QTimeZone::utc());
|
||||
return dt;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user