From 63de60dac600542823843223ee091ace86725361 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 8 Nov 2010 09:26:45 +0000 Subject: QXmppEntityTimeIq should store timezone offsets in seconds and handle parsing / serialisation internally. --- src/QXmppEntityTimeManager.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/QXmppEntityTimeManager.cpp') diff --git a/src/QXmppEntityTimeManager.cpp b/src/QXmppEntityTimeManager.cpp index 443229df..239bcfae 100644 --- a/src/QXmppEntityTimeManager.cpp +++ b/src/QXmppEntityTimeManager.cpp @@ -69,19 +69,7 @@ bool QXmppEntityTimeManager::handleStanza(const QDomElement &element) responseIq.setUtc(utc); currentTime.setTimeSpec(Qt::UTC); - int tzo_sec = utc.secsTo(currentTime); - QTime tzo_time; - if(tzo_sec < 0) - tzo_time = tzo_time.addSecs(-tzo_sec); - else - tzo_time = tzo_time.addSecs(tzo_sec); - QString tzo; - if(tzo_sec < 0) - tzo = "-" + tzo_time.toString("hh:mm"); - else - tzo = "+" + tzo_time.toString("hh:mm"); - - responseIq.setTzo(tzo); + responseIq.setTzo(utc.secsTo(currentTime)); client()->sendPacket(responseIq); } -- cgit v1.2.3