fix #329
This commit is contained in:
parent
8f0495b18a
commit
fecfe22e7d
@ -130,7 +130,7 @@ QDateTime TextFactory::parseDateTime(const QString& date_time) {
|
||||
}
|
||||
|
||||
QDateTime TextFactory::parseDateTime(qint64 milis_from_epoch) {
|
||||
return QDateTime::fromMSecsSinceEpoch(milis_from_epoch);
|
||||
return QDateTime::fromMSecsSinceEpoch(milis_from_epoch, Qt::TimeSpec::UTC);
|
||||
}
|
||||
|
||||
QString TextFactory::encrypt(const QString& text) {
|
||||
|
@ -26,7 +26,7 @@ class TextFactory {
|
||||
static QDateTime parseDateTime(const QString& date_time);
|
||||
|
||||
// Converts 1970-epoch miliseconds to date/time.
|
||||
// NOTE: This apparently returns date/time in localtime.
|
||||
// NOTE: This method tries to always return time in UTC.
|
||||
static QDateTime parseDateTime(qint64 milis_from_epoch);
|
||||
static QString encrypt(const QString& text);
|
||||
static QString decrypt(const QString& text);
|
||||
|
@ -580,7 +580,7 @@ QList<Message>OwnCloudGetMessagesResponse::messages() const {
|
||||
msg.m_contents = message_map["body"].toString();
|
||||
msg.m_created = TextFactory::parseDateTime(message_map["pubDate"].toDouble() * 1000);
|
||||
msg.m_createdFromFeed = true;
|
||||
msg.m_customId = message_map["id"].isString() ? message_map["id"].toString() : QString::number(message_map["id"].toInt());
|
||||
msg.m_customId = message_map["id"].toVariant().toString();
|
||||
msg.m_customHash = message_map["guidHash"].toString();
|
||||
|
||||
QString enclosure_link = message_map["enclosureLink"].toString();
|
||||
@ -593,7 +593,7 @@ QList<Message>OwnCloudGetMessagesResponse::messages() const {
|
||||
msg.m_enclosures.append(enclosure);
|
||||
}
|
||||
|
||||
msg.m_feedId = message_map["feedId"].toString();
|
||||
msg.m_feedId = message_map["feedId"].toVariant().toString();
|
||||
msg.m_isImportant = message_map["starred"].toBool();
|
||||
msg.m_isRead = !message_map["unread"].toBool();
|
||||
msg.m_title = message_map["title"].toString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user