XEP-0202: Entity Time

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.
  • Peter Saint-Andre
  • Maciej Niedzielski
© 2006 – 2009 XMPP Standards Foundation. SEE LEGAL NOTICES.


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.
Standards Track
2.0 (2009-09-11)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

Although the XMPP protocol extension defined in Legacy Entity Time (XEP-0090) [1] provides a way to discover the time at another entity, it has several limitations:

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.

2. Protocol Definition

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':

Table 1: Child Elements
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

3. Examples

Example 1. Querying Another Entity for the Local Time
<iq type='get'
  <time xmlns='urn:xmpp:time'/>
Example 2. A Response to the Query
<iq type='result'
  <time xmlns='urn:xmpp:time'>

The standard error conditions described in Error Condition Mappings (XEP-0086) [4] apply (e.g., <service-unavailable/> if the entity does not support the namespace).

4. Service Discovery

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 (XEP-0030) [5] information request:

Example 3. Service Discovery information request
<iq type='get'
  <query xmlns='http://jabber.org/protocol/disco#info'/>
Example 4. Service Discovery information response
<iq type='result'
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <feature var='urn:xmpp:time'/>

5. Implementation Notes

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.

6. Security Considerations

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.

7. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].

8. XMPP Registrar Considerations

8.1 Protocol Namespace

The XMPP Registrar [8] includes 'urn:xmpp:time' in its registry of protocol namespaces (see <https://xmpp.org/registrar/namespaces.html>).

9. XML Schema

<?xml version='1.0' encoding='UTF-8'?>


      The protocol documented by this schema is defined in
      XEP-0202: http://www.xmpp.org/extensions/xep-0202.html

  <xs:element name='time'>
      <xs:sequence minOccurs='0'>
        <xs:element name='tzo' type='xs:string'/>
        <xs:element name='utc' type='xs:string'/>



Appendix A: Document Information

XMPP Standards Foundation
Standards Track
Last Updated
Approving Body
XMPP Council
XMPP Core, XEP-0082
Superseded By
Short Name
Source Control

This document in other formats: XML  PDF

Appendix B: Author Information

Peter Saint-Andre
Maciej Niedzielski


This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).


Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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.

Appendix E: Discussion Venue

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 <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

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".

Appendix G: Notes

1. XEP-0090: Legacy Entity Time <https://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 <https://xmpp.org/extensions/xep-0082.html>.

4. XEP-0086: Error Condition Mappings <https://xmpp.org/extensions/xep-0086.html>.

5. XEP-0030: Service Discovery <https://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 <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 2.0 (2009-09-11)

    Per a vote of the XMPP Council, advanced specification from Draft to Final.

  2. Version 1.0 (2007-03-28)

    Per a vote of the XMPP Council, advanced from Experimental to Draft.

  3. Version 0.2 (2007-03-19)

    Added service discovery section.

  4. Version 0.1 (2006-12-20)

    Initial version; further specified security considerations; per Council feedback, removed tz and display elements.

  5. Version 0.0.2 (2006-12-19)

    Clarified text; adjusted protocol definition; corrected schema.

  6. Version 0.0.1 (2006-12-05)

    First draft.


Appendix I: Bib(La)TeX Entry

  title = {Entity Time},
  author = {Saint-Andre, Peter and Niedzielski, Maciej},
  type = {XEP},
  number = {0202},
  version = {2.0},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0202.html},
  date = {2006-12-05/2009-09-11},