jabber:iq:time
The jabber:iq:time namespace qualifies
an IQ-based conversation to make or respond to a query on time
information.
To query the time at a particular entity, an IQ-get request like this is sent:
SEND: <iq type='get' id='time_19' to='conference.yak'>
<query xmlns='jabber:iq:time'/>
</iq>
Three pieces of information—the time in UTC (coordinated universal time) format, the local time zone, and a nice display version of the local time—are returned in response to such a query:
RECV: <iq type='result' id='time_19' to='sabine@yak/Work'
from='conference.yak'>
<query xmlns='jabber:iq:time'>
<utc>20010520T08:55:38</utc>
<tz>GMT</tz>
<display>Sun May 20 09:55:38 2001</display>
</query>
</iq>
The format of the <tz/> and
<display> tags
is not fixed. While this is what the Conferencing service
returns, a response from the JIM client
would give “GMT Standard Time” and “20/05/01 09:55:38,” respectively.
Note
If you consider that certain components can be connected to the Jabber backbone but be running on different hosts in different time zones, communicating over TCP socket connections (as described in Section 4.16 in Chapter 4), this may be more useful than you initially think.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access