No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0202.xml 9.1KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Entity Time</title>
  10. <abstract>This specification defines an XMPP protocol extension for communicating the local time of an entity, including the time in UTC according to the entity as well as the offset from UTC. The time format itself conforms to the dateTime profile of ISO 8601 defined in XEP-0082.</abstract>
  12. <number>0202</number>
  13. <status>Final</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0082</spec>
  20. </dependencies>
  21. <supersedes>
  22. <spec>XEP-0090</spec>
  23. </supersedes>
  24. <supersededby/>
  25. <shortname>time</shortname>
  26. <schemaloc>
  27. <url></url>
  28. </schemaloc>
  29. &stpeter;
  30. <author>
  31. <firstname>Maciej</firstname>
  32. <surname>Niedzielski</surname>
  33. <email></email>
  34. <jid></jid>
  35. </author>
  36. <revision>
  37. <version>2.0</version>
  38. <date>2009-09-11</date>
  39. <initials>psa</initials>
  40. <remark><p>Per a vote of the XMPP Council, advanced specification from Draft to Final.</p></remark>
  41. </revision>
  42. <revision>
  43. <version>1.0</version>
  44. <date>2007-03-28</date>
  45. <initials>psa</initials>
  46. <remark><p>Per a vote of the XMPP Council, advanced from Experimental to Draft.</p></remark>
  47. </revision>
  48. <revision>
  49. <version>0.2</version>
  50. <date>2007-03-19</date>
  51. <initials>psa</initials>
  52. <remark><p>Added service discovery section.</p></remark>
  53. </revision>
  54. <revision>
  55. <version>0.1</version>
  56. <date>2006-12-20</date>
  57. <initials>psa</initials>
  58. <remark><p>Initial version; further specified security considerations; per Council feedback, removed tz and display elements.</p></remark>
  59. </revision>
  60. <revision>
  61. <version>0.0.2</version>
  62. <date>2006-12-19</date>
  63. <initials>psa</initials>
  64. <remark><p>Clarified text; adjusted protocol definition; corrected schema.</p></remark>
  65. </revision>
  66. <revision>
  67. <version>0.0.1</version>
  68. <date>2006-12-05</date>
  69. <initials>mn</initials>
  70. <remark><p>First draft.</p></remark>
  71. </revision>
  72. </header>
  73. <section1 topic='Introduction' anchor='intro'>
  74. <p>Although the XMPP protocol extension defined in &xep0090; provides a way to discover the time at another entity, it has several limitations:</p>
  75. <ul>
  76. <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>
  77. <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=''></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>
  78. <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>
  79. <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>
  80. </ul>
  81. <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>
  82. </section1>
  83. <section1 topic='Protocol Definition' anchor='protocol'>
  84. <p>The protocol 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 the 'urn:xmpp:time' namespace. The following children of the &lt;time/&gt; element are defined for use in IQ stanzas of type 'result':</p>
  85. <table caption='Child Elements'>
  86. <tr>
  87. <th>Element</th>
  88. <th>Definition</th>
  89. <th>Inclusion</th>
  90. </tr>
  91. <tr>
  92. <td>&lt;tzo/&gt;</td>
  93. <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>
  94. <td>REQUIRED</td>
  95. </tr>
  96. <tr>
  97. <td>&lt;utc/&gt;</td>
  98. <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>
  99. <td>REQUIRED</td>
  100. </tr>
  101. </table>
  102. </section1>
  103. <section1 topic='Examples' anchor='examples'>
  104. <example caption='Querying Another Entity for the Local Time'><![CDATA[
  105. <iq type='get'
  106. from=''
  107. to=''
  108. id='time_1'>
  109. <time xmlns='urn:xmpp:time'/>
  110. </iq>
  111. ]]></example>
  112. <example caption='A Response to the Query'><![CDATA[
  113. <iq type='result'
  114. from=''
  115. to=''
  116. id='time_1'>
  117. <time xmlns='urn:xmpp:time'>
  118. <tzo>-06:00</tzo>
  119. <utc>2006-12-19T17:58:35Z</utc>
  120. </time>
  121. </iq>
  122. ]]></example>
  123. <p>The standard error conditions described in &xep0086; apply (e.g., &unavailable; if the entity does not support the namespace).</p>
  124. </section1>
  125. <section1 topic='Service Discovery' anchor='disco'>
  126. <p>If an entity supports the Entity Time protocol, it MUST report that by including a service discovery feature of "urn:xmpp:time" in response to a &xep0030; information request:</p>
  127. <example caption="Service Discovery information request"><![CDATA[
  128. <iq type='get'
  129. from=''
  130. to=''
  131. id='disco1'>
  132. <query xmlns=''/>
  133. </iq>
  134. ]]></example>
  135. <example caption="Service Discovery information response"><![CDATA[
  136. <iq type='result'
  137. from=''
  138. to=''
  139. id='disco1'>
  140. <query xmlns=''>
  141. ...
  142. <feature var='urn:xmpp:time'/>
  143. ...
  144. </query>
  145. </iq>
  146. ]]></example>
  147. </section1>
  148. <section1 topic='Implementation Notes' anchor='impl'>
  149. <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>
  150. <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>
  151. </section1>
  152. <section1 topic='Security Considerations' anchor='security'>
  153. <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>
  154. </section1>
  155. <section1 topic='IANA Considerations' anchor='iana'>
  156. <p>This document requires no interaction with &IANA;.</p>
  157. </section1>
  158. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  159. <section2 topic='Protocol Namespace' anchor='ns'>
  160. <p>The &REGISTRAR; includes 'urn:xmpp:time' in its registry of protocol namespaces (see &NAMESPACES;).</p>
  161. </section2>
  162. </section1>
  163. <section1 topic='XML Schema' anchor='schema'>
  164. <code><![CDATA[
  165. <?xml version='1.0' encoding='UTF-8'?>
  166. <xs:schema
  167. xmlns:xs=''
  168. targetNamespace='urn:xmpp:time'
  169. xmlns='urn:xmpp:time'
  170. elementFormDefault='qualified'>
  171. <xs:annotation>
  172. <xs:documentation>
  173. The protocol documented by this schema is defined in
  174. XEP-0202:
  175. </xs:documentation>
  176. </xs:annotation>
  177. <xs:element name='time'>
  178. <xs:complexType>
  179. <xs:sequence minOccurs='0'>
  180. <xs:element name='tzo' type='xs:string'/>
  181. <xs:element name='utc' type='xs:string'/>
  182. </xs:sequence>
  183. </xs:complexType>
  184. </xs:element>
  185. </xs:schema>
  186. ]]></code>
  187. </section1>
  188. </xep>