}
// The legacy protocol would only send a QTime, no QDateTime
// so we assume it's sent today, which works in exactly the same cases as it did in the old implementation
- QDateTime dateTime = QDateTime::currentDateTimeUtc();
+ QDateTime dateTime = QDateTime::currentDateTime().toUTC();
dateTime.setTime(params[0].toTime());
handle(Protocol::HeartBeat(dateTime));
break;
}
// The legacy protocol would only send a QTime, no QDateTime
// so we assume it's sent today, which works in exactly the same cases as it did in the old implementation
- QDateTime dateTime = QDateTime::currentDateTimeUtc();
+ QDateTime dateTime = QDateTime::currentDateTime().toUTC();
dateTime.setTime(params[0].toTime());
handle(Protocol::HeartBeatReply(dateTime));
break;
void RemotePeer::handle(const HeartBeatReply &heartBeatReply)
{
_heartBeatCount = 0;
-#if QT_VERSION < 0x040700
- emit lagUpdated(heartBeatReply.timestamp().time().msecsTo(QTime::currentTime()) / 2);
-#else
- emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime()) / 2);
-#endif
+ emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime().toUTC()) / 2);
}
emit lagUpdated(_lag);
}
- dispatch(HeartBeat(QDateTime::currentDateTime()));
+ dispatch(HeartBeat(QDateTime::currentDateTime().toUTC()));
++_heartBeatCount;
}
-
-