Fix lag display
[quassel.git] / src / common / protocols / legacy / legacypeer.cpp
index 709291f..0f9c61e 100644 (file)
@@ -18,6 +18,8 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
+#include <QTcpSocket>
+
 #include "legacypeer.h"
 
 using namespace Protocol;
@@ -206,7 +208,7 @@ void LegacyPeer::handlePackedFunc(const QVariant &packedFunc)
             }
             // 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;
@@ -218,7 +220,7 @@ void LegacyPeer::handlePackedFunc(const QVariant &packedFunc)
             }
             // 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;