timestamp in AMQP-0-9-1 should be seconds since 1970-01-01 other than miliseconds
This commit is contained in:
parent
aa2b989438
commit
3dad5e7661
|
|
@ -202,7 +202,7 @@ QVariant QAmqpFrame::readAmqpField(QDataStream &s, QAmqpMetaType::ValueType type
|
||||||
{
|
{
|
||||||
qulonglong tmp_value;
|
qulonglong tmp_value;
|
||||||
s >> tmp_value;
|
s >> tmp_value;
|
||||||
return QDateTime::fromMSecsSinceEpoch(tmp_value);
|
return QDateTime::fromTime_t(tmp_value);
|
||||||
}
|
}
|
||||||
case QAmqpMetaType::Hash:
|
case QAmqpMetaType::Hash:
|
||||||
{
|
{
|
||||||
|
|
@ -256,7 +256,7 @@ void QAmqpFrame::writeAmqpField(QDataStream &s, QAmqpMetaType::ValueType type, c
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QAmqpMetaType::Timestamp:
|
case QAmqpMetaType::Timestamp:
|
||||||
s << qulonglong(value.toDateTime().toMSecsSinceEpoch());
|
s << qulonglong(value.toDateTime().toTime_t());
|
||||||
break;
|
break;
|
||||||
case QAmqpMetaType::Hash:
|
case QAmqpMetaType::Hash:
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue