public class Time
extends org.jivesoftware.smack.packet.IQ
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
| Constructor and Description |
|---|
Time() |
Time(java.util.Calendar cal)
Creates a new Time instance using the specified calendar instance as
the time value to send.
|
| Modifier and Type | Method and Description |
|---|---|
static Time |
createResponse(org.jivesoftware.smack.packet.IQ request) |
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder |
getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder buf) |
java.util.Date |
getTime()
Returns the local time or null if the time hasn't been set.
|
java.lang.String |
getTzo()
Returns the time zone.
|
java.lang.String |
getUtc()
Returns the time as a UTC formatted String using the format CCYY-MM-DDThh:mm:ssZ.
|
void |
setTime(java.util.Date time)
Sets the time using the local time.
|
void |
setTzo(java.lang.String tzo)
Sets the time zone offset.
|
void |
setUtc(java.lang.String utc)
Sets the time using UTC formatted String in the format CCYY-MM-DDThh:mm:ssZ.
|
createErrorResponse, createResultIQ, getChildElementName, getChildElementNamespace, getChildElementXML, getType, isRequestIQ, setType, toXMLaddCommonAttributes, addExtension, addExtensions, appendErrorIfExists, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensions, getExtensionsXML, getFrom, getLanguage, getPacketID, getStanzaId, getTo, hasExtension, hasExtension, hasStanzaIdSet, overrideExtension, removeExtension, removeExtension, setError, setFrom, setLanguage, setPacketID, setStanzaId, setTo, toStringpublic static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
public Time()
public Time(java.util.Calendar cal)
cal - the time value.public java.util.Date getTime()
public void setTime(java.util.Date time)
time - the current local time.public java.lang.String getUtc()
public void setUtc(java.lang.String utc)
utc - the time using a formatted String.public java.lang.String getTzo()
public void setTzo(java.lang.String tzo)
tzo - the time zone offset.public static Time createResponse(org.jivesoftware.smack.packet.IQ request)
protected org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder buf)
getIQChildElementBuilder in class org.jivesoftware.smack.packet.IQ