String timeZone = new SimpleDateFormat("Z").format(now);
timeZone = timeZone.substring(0, 3) + ":" + timeZone.substring(3, 5); // adjust to required formatting "-00:08"
String utcTime = DateTimeProfile.getInstance().getDateTimeInUTC(now);
StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), IQStanzaType.RESULT, stanza.getID()).
startInnerElement("time", NamespaceURIs.URN_XMPP_TIME).
startInnerElement("tzo", NamespaceURIs.URN_XMPP_TIME).addText(timeZone).endInnerElement().
startInnerElement("utc", NamespaceURIs.URN_XMPP_TIME).addText(utcTime).endInnerElement().
endInnerElement();
return stanzaBuilder.build();
}