| 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. |
| Authors: | Peter Saint-Andre, Maciej Niedzielski |
| Copyright: | © 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Final |
| Type: | Standards Track |
| Version: | 2.0 |
| Last Updated: | 2009-09-11 |
NOTICE: The protocol defined herein is a Final Standard of the XMPP Standards Foundation and can be considered a stable technology for implementation and deployment.
1. Introduction
2. Protocol Definition
3. Examples
4. Service Discovery
5. Implementation Notes
6. Security Considerations
7. IANA Considerations
8. XMPP Registrar Considerations
8.1. Protocol Namespace
9. XML Schema
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
Although the XMPP protocol extension defined in Legacy Entity Time [1] provides a way to discover the time at another entity, it has several limitations:
The 'jabber:iq:time' namespace specified in XEP-0090 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.
The timezone may be specified in a natural language (English) name via the <tz/> 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 [2] and in practice the XML character data of the <tx/> element is effectively useless.
The responding entity may provide a user-friendly datetime format via the <display/> element, but this too is effectively useless since datetime formats vary widely by culture and nation.
The 'jabber:iq:time' namespace specified in XEP-0090 (first developed in 1999 or 2000) is not consistent with the recommended date and time profiles for XMPP protocols defined in XMPP Date and Time Profiles [3] (written in 2003).
To overcome these limitations, this document defines a replacement for XEP-0090 which enables communication of an entity's UTC time and numeric time zone offset while adhering to XEP-0082.
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 <time/> element qualified by the 'urn:xmpp:time' namespace. The following children of the <time/> element are defined for use in IQ stanzas of type 'result':
| Element | Definition | Inclusion |
|---|---|---|
| <tzo/> | The entity's numeric time zone offset from UTC. The format MUST conform to the Time Zone Definition (TZD) specified in XEP-0082. | REQUIRED |
| <utc/> | The UTC time according to the responding entity. The format MUST conform to the dateTime profile specified in XEP-0082 and MUST be expressed in UTC. | REQUIRED |
Example 1. Querying Another Entity for the Local Time
<iq type='get'
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
id='time_1'>
<time xmlns='urn:xmpp:time'/>
</iq>
Example 2. A Response to the Query
<iq type='result'
from='juliet@capulet.com/balcony'
to='romeo@montague.net/orchard'
id='time_1'>
<time xmlns='urn:xmpp:time'>
<tzo>-06:00</tzo>
<utc>2006-12-19T17:58:35Z</utc>
</time>
</iq>
The standard error conditions described in Error Condition Mappings [4] apply (e.g., <service-unavailable/> if the entity does not support the namespace).
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 Service Discovery [5] information request:
Example 3. Service Discovery information request
<iq type='get'
from='romeo@montague.net/orchard'
to='juliet@capulet.com/balcony'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 4. Service Discovery information response
<iq type='result'
from='juliet@capulet.com/balcony'
to='romeo@montague.net/orchard'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:time'/>
...
</query>
</iq>
This protocol was designed in a way that makes migration from XEP-0090 straightforward. This document specifies a different format for the XML character data of the <utc> element (compliant with XEP-0082) and specifies a new <tzo> element for the numeric offset from UTC, while removing the formerly optional and effectively useless <display/> and <tz/> elements.
Implementations that support XEP-0090 should support the protocol defined herein as soon as possible, but should continue to support the protocol defined in XEP-0090 for backwards compatibility until the status of that specification is changed to Obsolete.
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 (RFC 958 [6]) or a similar technology to stay synchronized with actual UTC.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].
The XMPP Registrar [8] includes 'urn:xmpp:time' in its registry of protocol namespaces (see <http://xmpp.org/registrar/namespaces.html>).
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:time'
xmlns='urn:xmpp:time'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0202: http://www.xmpp.org/extensions/xep-0202.html
</xs:documentation>
</xs:annotation>
<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>
Series: XEP
Number: 0202
Publisher: XMPP Standards Foundation
Status:
Final
Type:
Standards Track
Version: 2.0
Last Updated: 2009-09-11
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0082
Supersedes: XEP-0090
Superseded By: None
Short Name: time
Schema: <http://www.xmpp.org/schemas/time.xsd>
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
Email:
machekku@uaznia.net
JabberID:
machekku@uaznia.net
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0090: Legacy Entity Time <http://xmpp.org/extensions/xep-0090.html>.
2. A list of English-language time zone names and abbreviations is located at <http://www.timeanddate.com/library/abbreviations/timezones/>, but it is not a canonical list and there are no such localized lists for all languages.
3. XEP-0082: XMPP Date and Time Profiles <http://xmpp.org/extensions/xep-0082.html>.
4. XEP-0086: Error Condition Mappings <http://xmpp.org/extensions/xep-0086.html>.
5. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
6. RFC 958: Network Time Protocol (NTP) <http://tools.ietf.org/html/rfc0958>.
7. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Per a vote of the XMPP Council, advanced specification from Draft to Final.
(psa)Per a vote of the XMPP Council, advanced from Experimental to Draft.
(psa)Added service discovery section.
(psa)Initial version; further specified security considerations; per Council feedback, removed tz and display elements.
(psa)Clarified text; adjusted protocol definition; corrected schema.
(psa)First draft.
(mn)END