1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-28 12:12:22 -05:00
xeps/xep-0202.xml
Peter Saint-Andre 067239b9e8 typos
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@419 4b5297f7-1745-476d-ba37-a9c6900126ab
2007-01-25 18:23:54 +00:00

142 lines
7.7 KiB
XML

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>Entity Time</title>
<abstract>This document defines an XMPP protocol extension for communicating the local time of an entity.</abstract>
&LEGALNOTICE;
<number>0202</number>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0082</spec>
</dependencies>
<supersedes>
<spec>XEP-0090</spec>
</supersedes>
<supersededby/>
<shortname>NOT YET ASSIGNED</shortname>
&stpeter;
<author>
<firstname>Maciej</firstname>
<surname>Niedzielski</surname>
<email>machekku@uaznia.net</email>
<jid>machekku@uaznia.net</jid>
</author>
<revision>
<version>0.1</version>
<date>2006-12-20</date>
<initials>psa</initials>
<remark><p>Initial version; further specified security considerations; per Council feedback, removed tz and display elements.</p></remark>
</revision>
<revision>
<version>0.0.2</version>
<date>2006-12-19</date>
<initials>psa</initials>
<remark><p>Clarified text; adjusted protocol definition; corrected schema.</p></remark>
</revision>
<revision>
<version>0.0.1</version>
<date>2006-12-05</date>
<initials>mn</initials>
<remark><p>First draft.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>Although the XMPP protocol extension defined in &xep0090; provides a way to discover the time at another entity, it has several limitations:</p>
<ul>
<li><p>The 'jabber:iq:time' namespace specified in <cite>XEP-0090</cite> requires communication of time only in UTC. While this is useful for UTC synchronization (e.g., if a client wants to synchronize with its server), it does not enable one entity to know the other entity's offset from UTC.</p></li>
<li><p>The timezone may be specified in a natural language (English) name via the &lt;tz/&gt; element, but not in a numeric offest. The name may be not understood by the requesting entity since there is no reliable and canonical list of timezone names <note>A list of English-language time zone names and abbreviations is located at &lt;<link url='http://www.timeanddate.com/library/abbreviations/timezones/'>http://www.timeanddate.com/library/abbreviations/timezones/</link>&gt;, but it is not a canonical list and there are no such localized lists for all languages.</note> and in practice the XML character data of the &lt;tx/&gt; element is effectively useless.</p></li>
<li><p>The responding entity may provide a user-friendly datetime format via the &lt;display/&gt; element, but this too is effectively useless since datetime formats vary widely by culture and nation.</p></li>
<li><p>The 'jabber:iq:time' namespace specified in <cite>XEP-0090</cite> (first developed in 1999 or 2000) is not consistent with the recommended date and time profiles for XMPP protocols defined in &xep0082; (written in 2003).</p></li>
</ul>
<p>To overcome these limitations, this document defines a replacement for <cite>XEP-0090</cite> which enables communication of an entity's UTC time and numeric time zone offset while adhering to <cite>XEP-0082</cite>.</p>
</section1>
<section1 topic='Protocol Definition' anchor='protocol'>
<p>The namespace defined herein provides a standard way for XMPP entities to exchange information about the local time. The information is communicated in a request/response pair using an &IQ; element that contains a &lt;time/&gt; element qualified by an XML namespace to be issued when this specification advances to a status of Draft (see <link url='#ns'>Protocol Namespace</link>). The following children of the &lt;time/&gt; element are defined for use in IQ stanzas of type 'result':</p>
<table caption='Child Elements'>
<tr>
<th>Element</th>
<th>Definition</th>
<th>Inclusion</th>
</tr>
<tr>
<td>&lt;tzo/&gt;</td>
<td>The entity's numeric time zone offset from UTC. The format MUST conform to the Time Zone Definition (TZD) specified in <cite>XEP-0082</cite>.</td>
<td>REQUIRED</td>
</tr>
<tr>
<td>&lt;utc/&gt;</td>
<td>The UTC time according to the responding entity. The format MUST conform to the dateTime profile specified in <cite>XEP-0082</cite> and MUST be expressed in UTC.</td>
<td>REQUIRED</td>
</tr>
</table>
</section1>
<section1 topic='Examples' anchor='examples'>
<example caption='Querying Another Entity for the Local Time'><![CDATA[
<iq type='get'
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
id='time_1'>
<time xmlns='http://www.xmpp.org/extensions/xep-0202.html#ns'/>
</iq>
]]></example>
<example caption='A Response to the Query'><![CDATA[
<iq type='result'
from='juliet@capulet.com/balcony'
to='romeo@montague.net/orchard'
id='time_1'>
<time xmlns='http://www.xmpp.org/extensions/xep-0202.html#ns'>
<tzo>-06:00</tzo>
<utc>2006-12-19T17:58:35Z</utc>
</time>
</iq>
]]></example>
<p>The standard error conditions described in &xep0086; apply (e.g., &unavailable; if the entity does not support the namespace).</p>
</section1>
<section1 topic='Implementation Notes' anchor='impl'>
<p>This protocol was designed in a way that makes migration from <cite>XEP-0090</cite> straightforward. This document specifies a different format for the XML character data of the &lt;utc&gt; element (compliant with <cite>XEP-0082</cite>) and specifies a new &lt;tzo&gt; element for the numeric offset from UTC, while removing the formerly optional and effectively useless &lt;display/&gt; and &lt;tz/&gt; elements.</p>
<p>Implementations that support <cite>XEP-0090</cite> should support the protocol defined herein as soon as possible, but should continue to support the protocol defined in <cite>XEP-0090</cite> for backwards compatibility until the status of that specification is changed to Obsolete.</p>
</section1>
<section1 topic='Security Considerations' anchor='registrar'>
<p>Revealing an entity's numeric time zone offset may leak limited information about the entity's current location. If the entity's understanding of UTC is far off from actual UTC, revealing that discrepancy may make it possible for an attacker to send XML stanzas that appear to be in the past or future even though they are not; therefore an entity should use the Network Time Protocol (&rfc0958;) or a similar technology to stay synchronized with actual UTC.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespace' anchor='ns'>
<p>Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0202.html#ns"; upon advancement of this specification, the XMPP Registrar shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://www.xmpp.org/extensions/xep-0202.html#ns'
xmlns='http://www.xmpp.org/extensions/xep-0202.html#ns'
elementFormDefault='qualified'>
<xs:element name='time'>
<xs:complexType>
<xs:sequence minOccurs='0'>
<xs:element name='tzo' type='xs:string'/>
<xs:element name='utc' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
]]></code>
</section1>
</xep>