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.Packet request) |
java.lang.String |
getChildElementXML() |
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, getType, setType, toXMLaddCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, 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.Packet request)
public java.lang.String getChildElementXML()
getChildElementXML in class org.jivesoftware.smack.packet.IQ