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