From e32af4aa834d4ea33bebb09287d75758c062ec22 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 8 Nov 2010 09:41:03 +0000 Subject: only write tzo if the time is valid --- src/QXmppEntityTimeIq.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/QXmppEntityTimeIq.cpp') diff --git a/src/QXmppEntityTimeIq.cpp b/src/QXmppEntityTimeIq.cpp index 7a90f64c..624d5751 100644 --- a/src/QXmppEntityTimeIq.cpp +++ b/src/QXmppEntityTimeIq.cpp @@ -81,10 +81,10 @@ void QXmppEntityTimeIq::toXmlElementFromChild(QXmlStreamWriter *writer) const writer->writeStartElement("time"); helperToXmlAddAttribute(writer, "xmlns", ns_entity_time); - helperToXmlAddTextElement(writer, "tzo", timezoneOffsetToString(m_tzo)); - if(m_utc.isValid()) + { + helperToXmlAddTextElement(writer, "tzo", timezoneOffsetToString(m_tzo)); helperToXmlAddTextElement(writer, "utc", datetimeToString(m_utc)); - + } writer->writeEndElement(); } -- cgit v1.2.3