<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.1 (Ruby 3.2.2) -->

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-sedate-datetime-extended-11" number="9557" submissionType="IETF" category="std" consensus="true" xml:lang="en" updates="3339" obsoletes="" tocDepth="4" tocInclude="true" sortRefs="true" symRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.18.1 -->
  <front>
    <title abbrev="Internet Extended Date/Time Format (IXDTF)">Date and Time on the Internet: Timestamps with Additional Information</title>
    <seriesInfo name="RFC" value="9557"/>
    <author initials="U." surname="Sharma" fullname="Ujjwal Sharma">
      <organization>Igalia, S.L.</organization>
      <address>
        <postal>
          <street>Bugallal Marchesi, 22, 1º</street>
          <city>A Coruña</city>
          <code>15008</code>
          <country>Spain</country>
        </postal>
        <email>ryzokuken@igalia.com</email>
      </address>
    </author>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="April"/>
    <area>art</area>
    <workgroup>sedate</workgroup>
<keyword>Gregorian calendar</keyword>
<keyword>Calendar awareness</keyword>
<keyword>Time zone</keyword>
<keyword>ISO 8601</keyword>
<keyword>Temporal</keyword>
<keyword>RFC 3339</keyword>
<keyword>Extension</keyword>
<keyword>Internet Extended Date/Time Format</keyword>
<keyword>IXDTF</keyword>
    <abstract>
<t>This document defines an extension to the timestamp format defined in
RFC 3339 for representing additional information, including a time
zone.</t>
      <t>It updates RFC 3339 in the specific interpretation of the local offset
<tt>Z</tt>, which is no longer understood to "imply that UTC is the preferred
reference point for the specified time".</t>
    </abstract>
  </front>
  <middle>

<section anchor="intro">
      <name>Introduction</name>
      <t>Dates and times are used in a very diverse set of Internet
applications, all the way from server-side logging to calendaring and
scheduling.</t>
      <t>Each distinct instant in time can be represented in a descriptive text
format using a timestamp.
<xref target="ISO8601-2019"/> standardizes a widely adopted
timestamp format, an earlier version of which <xref target="ISO8601"/> formed the
basis of the Internet Date/Time Format <xref target="RFC3339"/>.
However, this format allows timestamps to contain very little
additional relevant information.
Beyond that, any contextual
information related to a given timestamp needs to be either handled
separately or attached to it in a non-standard manner.</t>
      <t>This is a pressing issue for applications that handle each
such instant in time with an associated time zone name in order to take into account events
such as daylight saving time transitions.
Many of these applications attach the time zone to the timestamp in a
non-standard format, at least one of which is fairly well-adopted <xref target="JAVAZDT"/>.
Furthermore, applications might want to attach even more information to the
timestamp, including but not limited to the calendar system in which
      it should be represented.</t>
   <t>This document defines an extension to the timestamp format defined in
   <xref target="RFC3339"/> for representing additional information, including a time
   zone.</t>
   <t>It updates <xref target="RFC3339"/> in the specific interpretation of the local offset
   Z, which is no longer understood to "imply that UTC is the preferred
   reference point for the specified time"; see <xref target="update"/>.</t>
      <section anchor="scope">
        <name>Scope</name>
        <t><xref target="RFC3339"/> defines a syntax for timestamps to represent date and time in the Internet.  The present document defines an extension syntax that achieves the following properties:</t>
        <ul spacing="normal">
          <li>
            <t>The extension suffix is completely optional, making existing
<xref target="RFC3339"/> timestamps compatible with this format.</t>
          </li>
          <li>
            <t>The format is compatible with the pre-existing popular syntax for attaching
time zone names to timestamps <xref target="JAVAZDT"/>.</t>
          </li>
          <li>
            <t>The format provides a generalized way to attach additional
information to the timestamp.</t>
          </li>
        </ul>
        <t>We refer to this format as the Internet Extended Date/Time Format (IXDTF).</t>
        <t>This document does not address extensions to the format where the
semantic result is no longer a fixed timestamp that is referenced to a
(past or future) UTC time.
For instance, it does not address:</t>
        <ul spacing="normal">
          <li>
            <t>future time given as a local time in some specified time zone, where
changes to the definition of that time zone (such as a political
decision to enact or rescind daylight saving time) affect the
instant in time represented by the timestamp;</t>
          </li>
          <li>
            <t>"floating time", i.e., a local time without information describing
the UTC offset or time zone in which it should be interpreted; or</t>
          </li>
          <li>
            <t>the use of timescales different from UTC, such as International Atomic
Time (TAI).</t>
          </li>
        </ul>
        <t>However, additional information augmenting a fixed timestamp may be
sufficient to detect an inconsistency between the intention and the actual
information in the timestamp, such as between the UTC offset and time zone
name.
For instance, inconsistencies might arise because of:</t>
        <ul spacing="normal">
          <li>
            <t>political decisions, as discussed above,</t>
          </li>
          <li>
            <t>updates to time zone definitions being applied at different times
by timestamp producers and receivers, or</t>
          </li>
          <li>
            <t>errors in programs producing and consuming timestamps.</t>
          </li>
        </ul>
        <t>While the information available in an IXDTF string is not generally sufficient to resolve
an inconsistency, it may be used to initiate some out-of-band
processing to obtain sufficient information for such a resolution.</t>
        <t>In order to address some of the requirements implied here,
related specifications in the future might define syntax and semantics of strings
similar to those described in <xref target="RFC3339"/>.
Note that the extension syntax defined in the present document is
designed in such a way that it can be useful for such specifications
as well.</t>
      </section>
      <section anchor="definitions">
        <name>Definitions</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
<dl>
          <dt>UTC:</dt>
          <dd>
            <t>Coordinated Universal Time, as maintained since 1988 by the Bureau
International des Poids et Mesures (BIPM) in conjunction with leap
seconds as announced by the International Earth Rotation and
Reference Systems Service <xref target="IERS"/>.
From 1972 through 1987, UTC was maintained entirely by the Bureau
International de l'Heure (BIH).
Before 1972, UTC was not generally recognized, and civil time was
determined by individual jurisdictions using different techniques
for attempting to follow Universal Time based on measuring the
rotation of the earth.
</t>
            <t>UTC is often mistakenly referred to as GMT (Greenwich Mean Time), an earlier timescale
for which UTC was designed to be a useful successor.</t>
          </dd>
          <dt>ABNF:</dt>
          <dd>
            <t>Augmented Backus-Naur Form, a format used to represent permissible
strings in a protocol or language, as defined in <xref target="RFC5234"/>.
The rules defined in <xref section="B" sectionFormat="of" target="RFC5234"/> are imported implicitly.</t>
          </dd>
          <dt>IXDTF:</dt>
          <dd>
            <t>Internet Extended Date/Time Format, the date/time format defined in <xref target="extended-format"/> of this document.</t>
          </dd>
          <dt>Timestamp:</dt>
          <dd>
            <t>An unambiguous representation of a particular instant in time.</t>
          </dd>
          <dt>UTC Offset:</dt>
          <dd>
            <t>Difference between a given local time and UTC, usually given in
negative or positive hours and minutes. For example, local time in
the city of New York, NY, USA in the wintertime in 2023 was 5 hours
behind UTC, so its UTC offset was <tt>-05:00</tt>.</t>
          </dd>
          <dt>Z:</dt>
          <dd>
            <t>A suffix that, when applied to a time, denotes a UTC offset of
<tt>00:00</tt>; often pronounced "Zulu" from the ICAO phonetic alphabet
representation of the letter "Z".
(The definition is from <xref section="2" sectionFormat="of" target="RFC3339"/>; see the International Civil Aviation Organization (ICAO) document <xref target="ICAO-PA"/> for the
phonetic alphabet mentioned.)</t>
          </dd>
          <dt>Time Zone:</dt>
          <dd>
            <t>A set of rules representing the relationship of local time to UTC
for a particular place or region. Mathematically, a time zone can
be thought of as a function that maps timestamps to UTC offsets.
Time zones can deterministically convert a timestamp to local time.
They can also be used in the reverse direction to convert local time
to a timestamp, with the caveat that some local times may have zero
or multiple possible timestamps due to nearby daylight saving time
changes or other changes to the UTC offset of that time zone.
Unlike the UTC offset of a timestamp, which makes no claims about
the UTC offset of other related timestamps (and which is therefore
unsuitable for performing local-time operations, such as
"one day later"), a time zone also defines how to derive new
timestamps based on differences in local time.
For example, to calculate "one day later than this
timestamp in San Francisco, California", a time zone is required because the
UTC offset of local time in San Francisco can change from one day
to the next.</t>
          </dd>
          <dt>IANA Time Zone:</dt>
          <dd>
            <t>A named time zone that is included in the Time Zone Database (often
called <tt>tz</tt> or <tt>zoneinfo</tt>) maintained by IANA <xref target="TZDB"/> <xref target="BCP175"/>.
Most IANA Time Zones
are named for the largest city in a particular region that shares
the same time zone rules, e.g., <tt>Europe/Paris</tt> or <tt>Asia/Tokyo</tt> <xref target="TZDB-NAMING"/>.
</t>
            <t>The rules defined for a named IANA Time Zone can change
over time.
The use of a named IANA Time Zone implies that the intent is for the
rules that are current at the time of interpretation to apply:
the additional information conveyed by using that time zone name is
to change with any rule changes as recorded in the IANA Time Zone
Database.</t>
          </dd>
          <dt>Offset Time Zone:</dt>
          <dd>
            <t>A time zone defined by a specific UTC offset, e.g., <tt>+08:45</tt>, and
serialized using as its name the same numeric UTC offset format used in an <xref target="RFC3339"/>
timestamp, for example:
</t>
            <artwork><![CDATA[
2022-07-08T00:14:07+08:45[+08:45]
]]></artwork>
            <t>An offset in the suffix that does not repeat the offset of the
timestamp is inconsistent (see <xref target="inconsistent"/>).</t>
            <t>Although serialization with offset time zones is
supported in this document for backwards compatibility with
<tt>java.time.ZonedDateTime</tt> <xref target="JAVAZDT"/>, use of offset time zones is
strongly discouraged.
In particular, programs <bcp14>MUST NOT</bcp14> copy the UTC
offset from a timestamp into an offset time zone in order to satisfy
another program that requires a time zone suffix in its input.
Doing this will improperly assert that the UTC offset of timestamps
in that location will never change, which can result in incorrect
calculations in programs that add, subtract, or otherwise derive new
timestamps from the one provided. For example,
<tt>2020-01-01T00:00+01:00[Europe/Paris]</tt> will let programs add six
months to the timestamp while adjusting for summer time (daylight saving time).
However, the same calculation applied to <tt>2020-01-01T00:00+01:00[+01:00]</tt>
will produce an incorrect result that will be off by one hour in the
time zone <tt>Europe/Paris</tt>.</t>
          </dd>
          <dt>CLDR:</dt>
          <dd>
            <t>Common Locale Data Repository <xref target="CLDR"/>, a project of the Unicode
Consortium to provide locale data to applications.</t>
          </dd>
        </dl>
        <t>For more information about timescales, see <xref section="E" sectionFormat="of" target="RFC1305"/>,
Section 3 of <xref target="ISO8601"/>, and the appropriate ITU documents
<xref target="ITU-R-TF.460-6"/>. (Note: <xref target="RFC1305"/> was obsoleted by <xref target="RFC5905"/>,
which no longer contains the Appendix <xref target="RFC1305" section="E" sectionFormat="bare"/> referenced here.)</t>
      </section>
    </section>
    <section anchor="update">
      <name>Updating RFC 3339</name>
      <section anchor="background">
        <name>Background</name>
        <t><xref section="4.3" sectionFormat="of" target="RFC3339"/> states that an offset given as <tt>Z</tt> or
<tt>+00:00</tt> implies that "UTC is the preferred reference point for the
specified time".  The offset <tt>-00:00</tt> is provided as a way to express
that "the time in UTC is known, but the offset to local time is
unknown".</t>
        <t>This convention mirrors a similar convention for date/time information
in email headers that is described in <xref section="3.3" sectionFormat="of" target="RFC5322"/> and introduced
earlier in <xref section="3.3" sectionFormat="of" target="RFC2822"/>.
This email header convention is in actual use, while its adaptation into
<xref target="RFC3339"/> was always
compromised by the fact that <xref target="ISO8601-2000"/> and later versions do not actually allow <tt>-00:00</tt>.</t>
        <t>Implementations that needed to express the semantics of <tt>-00:00</tt>
therefore tended to use <tt>Z</tt> instead.</t>
      </section>
      <section anchor="update-to-rfc-3339">
        <name>Update to RFC 3339</name>
        <t>This specification updates <xref section="4.3" sectionFormat="of" target="RFC3339"/>, aligning it with the actual
practice of interpreting the offset <tt>Z</tt> to mean the same as <tt>-00:00</tt>:
"the time in UTC is known, but the offset to local time is unknown".</t>

<t><xref section="4.3" sectionFormat="of" target="RFC3339"/> is revised to read as follows:</t>
        <blockquote>
          <t>If the time in UTC is known, but the offset to local time is unknown,
   this can be represented with an offset of "Z".
   (The original version of this specification provided <tt>-00:00</tt> for
   this purpose, which is not allowed by <xref target="ISO8601-2000"/> and therefore
   is less interoperable; <xref section="3.3" sectionFormat="of" target="RFC5322"/> describes a related
   convention for email, which does not have this problem).
   This differs semantically from an offset of <tt>+00:00</tt>, which implies
   that UTC is the preferred reference point for the specified time.</t>
        </blockquote>
      </section>
      <section anchor="notes">
        <name>Notes</name>
        <t>Note that the semantics of the local offset <tt>+00:00</tt> is not updated;
this retains the implication that UTC is the preferred reference point
for the specified time.</t>
        <t>Also note that the fact that <xref target="ISO8601-2000"/> and later do not allow <tt>-00:00</tt> as a
local offset reduces the level of interoperability that can be
achieved in using this feature; however, the present specification does
not formally deprecate this syntax.
With the update to <xref target="RFC3339"/>, the local offset <tt>Z</tt> should now be used in its
place.</t>
      </section>
    </section>
    <section anchor="date-time-format">
      <name>Internet Extended Date/Time Format (IXDTF)</name>
      <t>This section discusses desirable qualities of formats for the
timestamp extension suffix and defines the IXDTF format, which extends
<xref target="RFC3339"/> for use in Internet protocols.</t>
      <section anchor="format-of-extended-information">
        <name>Format of Extended Information</name>
        <t>The format allows applications to specify additional
	important information in addition to a bare <xref target="RFC3339"/> timestamp.</t>
	<t>This is done by defining <em>tags</em>, each with a <em>key</em> and a <em>value</em>
separated by an equals sign.  The value of a tag can be one or more
items delimited by hyphen/minus signs.</t>
<t>Applications can build an informative timestamp <em>suffix</em> using any
   number of these tags.</t>
   <t>Keys are lowercase only.  Values are case-sensitive unless otherwise
   specified.</t>
	<t>See <xref target="optionally-critical"/> for the handling of inconsistent information
in a suffix.</t>
      </section>
      <section anchor="registered">
        <name>Registering Keys for Extended Information Tags</name>
        <t>Suffix tag keys are registered by supplying the information
specified in this section.  This information is modeled after that
specified for the "Media Types" registry <xref target="RFC6838"/>; if in doubt, the
	provisions of this registry should be applied analogously.</t>

        <dl>
          <dt>Key Identifier:</dt>
          <dd>
            <t>The key (conforming to <tt>suffix-key</tt> in <xref target="abnf"/>)</t>
          </dd>
          <dt>Registration Status:</dt>
          <dd>
            <t>"Provisional" or "Permanent"</t>
          </dd>
          <dt>Description:</dt>
          <dd>
            <t>A very brief description of the key</t>
          </dd>
          <dt>Change Controller:</dt>
          <dd>
            <t>Who is in control of evolving the specification governing values for
this key.  This information can include email addresses of contact
points, discussion lists, and references to relevant web pages (URLs).</t>
          </dd>
          <dt>Reference:</dt>
          <dd>
            <t>A reference.
For permanent tag keys, this includes a full specification.
For provisional tag keys, there is an expectation that some
information is available even if that does not amount to a full
specification; in this case, the registrant is expected to improve this
information over time.</t>
          </dd>
        </dl>
        <t>Key names that start with an underscore are intended for experiments
in controlled environments and cannot be registered; such keys <bcp14>MUST
NOT</bcp14> be used for interchange and <bcp14>MUST</bcp14> be rejected by implementations
not specifically configured to take part in such an experiment.
See <xref target="BCP178"/> for a discussion about the danger of experimental keys
leaking out to general production and why that must be prevented.</t>
     </section>
     <section anchor="optionally-critical">
        <name>Optional Generation and Elective vs. Critical Consumption</name>
        <t>For the IXDTF format, suffix tags are always <em>optional</em>. They
can be added or left out as desired by the generator of the string.
(An application might require the presence
of specific suffix tags, though.)</t>
        <t>Without further indication, suffix tags are also <em>elective</em>.
The recipient is free to ignore any suffix tag included in an IXDTF
string.
Reasons might include that the recipient does
not implement (or know about) the specific suffix key or that it does
recognize the key but cannot act on the value provided.</t>
        <t>A suffix tag may also indicate that it is <em>critical</em>: The recipient is
advised that it <bcp14>MUST NOT</bcp14> act on the IXDTF string
unless it can process the suffix tag as specified.  A critical suffix
tag is indicated by following its opening bracket with an exclamation
mark (see <tt>critical-flag</tt> in <xref target="abnf"/>).</t>
        <t>For example, IXDTF strings such as:</t>
        <artwork><![CDATA[
2022-07-08T00:14:07+01:00[Europe/Paris]
]]></artwork>
        <t>are internally inconsistent (see <xref target="inconsistent"/>), because <tt>Europe/Paris</tt> did not
use a time zone offset of <tt>+01:00</tt> in July 2022.
However, the time zone hint given in the suffix tag is elective, so the recipient is not
required to act on the inconsistency; it can treat the Internet
Date/Time Format string as if it were:</t>
        <artwork><![CDATA[
2022-07-08T00:14:07+01:00
]]></artwork>
        <aside>
          <t>Note that, as per <xref target="update"/> (see also <xref target="inconsistent"/>), the IXDTF string:</t>
          <artwork><![CDATA[
2022-07-08T00:14:07Z[Europe/Paris]
]]></artwork>
          <t>does not exhibit such an inconsistency, as the local offset of <tt>Z</tt>
does not imply a specific preferred time zone of interpretation.
Using the Time Zone Database rules for <tt>Europe/Paris</tt> in
the summer of 2022, it is equivalent to:</t>
          <artwork><![CDATA[
2022-07-08T02:14:07+02:00[Europe/Paris]
]]></artwork>
        </aside>
        <t>Similarly, an unknown suffix may be entirely ignored:</t>
        <artwork><![CDATA[
2022-07-08T00:14:07+01:00[knort=blargel]
]]></artwork>
        <t>(assuming that the recipient does not understand the suffix key <tt>knort</tt>).</t>
        <t>In contrast to this elective use of a suffix tag,</t>
        <artwork><![CDATA[
2022-07-08T00:14:07+01:00[!Europe/Paris]
2022-07-08T00:14:07Z[!u-ca=chinese][u-ca=japanese]
2022-07-08T00:14:07Z[u-ca=chinese][!u-ca=japanese]
2022-07-08T00:14:07Z[!knort=blargel]
]]></artwork>
        <t>each have an internal inconsistency or an unrecognized suffix key/value
that is marked as critical, so a recipient <bcp14>MUST</bcp14> treat these IXDTF
strings as erroneous.
This means that the application <bcp14>MUST</bcp14> reject the data or perform some
other error handling, such as asking the user how to resolve the
inconsistency (see <xref target="inconsistent"/>).</t>
        <t>Note that applications <bcp14>MAY</bcp14> also perform additional processing on
inconsistent or unrecognized elective suffix tags, such as asking the
user how to resolve the inconsistency.
While they are not required to do so with elective suffix tags, they are
required to reject or perform some other error handling when
encountering inconsistent or unrecognized suffix tags marked as
critical.</t>
        <t>An application that encounters duplicate use of a suffix key in
elective suffixes and does not want to perform additional processing
on this inconsistency <bcp14>MUST</bcp14> choose the first suffix that has that key,
that is,</t>
        <artwork><![CDATA[
2022-07-08T00:14:07Z[u-ca=chinese][u-ca=japanese]
2022-07-08T00:14:07Z[u-ca=chinese]
]]></artwork>
        <t>are then treated the same.</t>
      </section>
      <section anchor="inconsistent">
        <name>Inconsistent <tt>time-offset</tt> and Time Zone Information</name>
        <t>An <xref target="RFC3339"/> timestamp can contain a <tt>time-offset</tt> value that indicates
the offset between local time and UTC (see <xref section="4" sectionFormat="of" target="RFC3339"/>,
noting that <xref target="update"/> of the present specification updates <xref section="4.3" sectionFormat="of" target="RFC3339"/>).</t>
        <t>The information given in such a <tt>time-offset</tt> value can be
inconsistent with the information provided in a time zone suffix for an
IXDTF timestamp.</t>
        <t>For example, a calendar application could store an IXDTF string representing a
far-future meeting in a particular time zone. If that time zone's definition is
subsequently changed to abolish daylight saving time, IXDTF strings that were
originally consistent may now be inconsistent.</t>
        <t>In case of an inconsistency between <tt>time-offset</tt> and time zone suffix, if the
critical flag is used on the time zone suffix, an application <bcp14>MUST</bcp14> act
on the inconsistency.
If the critical flag is not used, it <bcp14>MAY</bcp14> act on the inconsistency.
Acting on the inconsistency may involve rejecting the timestamp or
resolving the inconsistency via additional information, such as user input
and/or programmed behavior.</t>
        <t>For example, the IXDTF timestamps in <xref target="example-inconsistent"/> represent
00:14:07 UTC, indicating a local time with a <tt>time-offset</tt> of <tt>+00:00</tt>.
However, because <tt>Europe/London</tt> used offset <tt>+01:00</tt> in July 2022, the
timestamps are inconsistent, where the first
case is one for which the application <bcp14>MUST</bcp14> act on the inconsistency (the
time zone suffix is marked critical) and the second case is one for which
it <bcp14>MAY</bcp14> act on the inconsistency (the time zone suffix is elective).</t>
        <figure anchor="example-inconsistent">
          <name>Inconsistent IXDTF Timestamps</name>
          <artwork><![CDATA[
2022-07-08T00:14:07+00:00[!Europe/London]
2022-07-08T00:14:07+00:00[Europe/London]
]]></artwork>
        </figure>

        <t>As per <xref section="4.3" sectionFormat="of" target="RFC3339"/> as updated by <xref target="update"/>, IXDTF
timestamps may also forego indicating local time information in their
<xref target="RFC3339"/> part by using <tt>Z</tt> instead of a numeric time zone offset.
The IXDTF timestamps in <xref target="example-consistent"/> (which represent the same
instant in time as the strings in <xref target="example-inconsistent"/>) are not
inconsistent because they do not assert any particular local time nor
local offset in their <xref target="RFC3339"/> part.
Instead, applications that receive these strings can calculate the
local offset and local time using the rules of the time zone suffix,
such as <tt>Europe/London</tt> in the example in <xref target="example-consistent"/>, which
like <xref target="example-inconsistent"/> has a case with a time zone suffix marked
critical (i.e., the intention is that the application must understand
the time zone information) and one marked elective, which then only is
provided as additional information.</t>
        <figure anchor="example-consistent">
          <name>No Inconsistency in IXDTF Timestamps</name>
          <artwork><![CDATA[
2022-07-08T00:14:07Z[!Europe/London]
2022-07-08T00:14:07Z[Europe/London]
]]></artwork>
        </figure>
        <t>Note that <tt>-00:00</tt> may be used instead of <tt>Z</tt> because they have the
same meaning according to <xref target="update"/>, but <tt>-00:00</tt> is not allowed by
<xref target="ISO8601-2000"/> and later so <tt>Z</tt> is preferred.</t>
      </section>
    </section>
    <section anchor="extended-format">
      <name>Syntax Extensions to RFC 3339</name>
      <section anchor="abnf">
        <name>ABNF</name>
        <t>The following rules extend the ABNF syntax defined in <xref target="RFC3339"/> in
order to allow the inclusion of an optional suffix.</t>
        <t>The Internet Extended Date/Time Format (IXDTF) is described by the
rule <tt>date-time-ext</tt>.</t>
        <t><tt>date-time</tt> and <tt>time-numoffset</tt> are imported from <xref section="5.6" sectionFormat="of" target="RFC3339"/>, and <tt>ALPHA</tt> and <tt>DIGIT</tt> are imported from <xref section="B.1" sectionFormat="of" target="RFC5234"/>.</t>
        <figure anchor="grammar">
          <name>ABNF Grammar of Extensions to RFC 3339</name>
          <sourcecode type="abnf" name="date-time-ext.abnf"><![CDATA[
time-zone-initial = ALPHA / "." / "_"
time-zone-char    = time-zone-initial / DIGIT / "-" / "+"
time-zone-part    = time-zone-initial *time-zone-char
                    ; but not "." or ".."
time-zone-name    = time-zone-part *("/" time-zone-part)
time-zone         = "[" critical-flag
                        time-zone-name / time-numoffset "]"

key-initial       = lcalpha / "_"
key-char          = key-initial / DIGIT / "-"
suffix-key        = key-initial *key-char

suffix-value      = 1*alphanum
suffix-values     = suffix-value *("-" suffix-value)
suffix-tag        = "[" critical-flag
                        suffix-key "=" suffix-values "]"
suffix            = [time-zone] *suffix-tag

date-time-ext     = date-time suffix

critical-flag     = [ "!" ]

alphanum          = ALPHA / DIGIT
lcalpha           = %x61-7A
]]></sourcecode>
        </figure>
        <t>Note that a <tt>time-zone</tt> is syntactically similar to a <tt>suffix-tag</tt>
but does not include an equals sign.
This special case is only available for time zone tags.</t>
        <t>The ABNF definition of <tt>time-zone-part</tt> matches "." and "..", which
are both explicitly excluded (see the note below on
<tt>time-zone-part</tt>).</t>
        <t><tt>time-zone-name</tt> is intended to be the name of an IANA Time Zone.
As a generator and a recipient may be using different revisions of the
Time Zone Database, recipients may not be aware of such an IANA Time
Zone name and should treat such a situation as any other inconsistency.</t>
        <aside>
          <t>Note: At the time of writing, the length of each <tt>time-zone-part</tt> is
limited to a maximum of 14 characters by the rules in <xref target="TZDB-NAMING"/>.
One platform is known to enforce this limit, and a time zone name
on another platform is known to exceed this limit.
As the <tt>time-zone-name</tt> will ultimately have to be looked up in the local
database, which therefore has control over the length, the
<tt>time-zone-part</tt> production in <xref target="grammar"/> is deliberately permissive.</t>
        </aside>
      </section>
      <section anchor="date-time-examples">
        <name>Examples</name>
        <t>This section contains some examples of Internet Extended Date/Time Format (IXDTF).</t>
        <figure anchor="rfc3339-datetime">
          <name>RFC 3339 date-time with Time Zone Offset</name>
          <artwork><![CDATA[
1996-12-19T16:39:57-08:00
]]></artwork>
        </figure>
        <t><xref target="rfc3339-datetime"/> represents 39 minutes and 57 seconds after the 16th hour of
December 19, 1996, with an offset of <tt>-08:00</tt> from UTC.
Note that this is the same instant in time as <tt>1996-12-20T00:39:57Z</tt>, expressed in UTC.</t>
        <figure anchor="datetime-tzname">
          <name>Adding a Time Zone Name</name>
          <artwork><![CDATA[
1996-12-19T16:39:57-08:00[America/Los_Angeles]
]]></artwork>
        </figure>
        <t><xref target="datetime-tzname"/> represents the exact same instant in time as the previous example but
additionally specifies the human time zone associated with it
("Pacific Time") for time-zone-aware applications to take into
account.</t>
        <figure anchor="date-time-hebrew">
          <name>Projecting to the Hebrew Calendar</name>
          <artwork><![CDATA[
1996-12-19T16:39:57-08:00[America/Los_Angeles][u-ca=hebrew]
]]></artwork>
        </figure>
        <t><xref target="date-time-hebrew"/> represents the exact same instant in time, but it informs calendar-aware
applications (see <xref target="calendar"/>) that they should project it to the Hebrew calendar.</t>
        <figure anchor="date-time-private">
          <name>Adding Experimental Tags</name>
          <artwork><![CDATA[
1996-12-19T16:39:57-08:00[_foo=bar][_baz=bat]
]]></artwork>
        </figure>
        <t><xref target="date-time-private"/>, based on <xref target="rfc3339-datetime"/>, utilizes keys
identified as experimental by a leading underscore to declare two additional pieces of
information in the suffix; these can be interpreted by implementations
that take part in the controlled experiment making use of these tag keys.</t>
      </section>
    </section>
    <section anchor="calendar">
      <name>The u-ca Suffix Key: Calendar Awareness</name>
      <t>Out of the possible suffix keys, the suffix key <tt>u-ca</tt> is allocated to
indicate the calendar in which the date/time is preferably presented.</t>
      <t>A calendar is a set of rules defining how dates are counted and
consumed by implementations.
The set of suffix values allowed for this suffix key is the set of
values defined for the Unicode Calendar Identifier <xref target="TR35"/>.

<xref target="CLDR-LINKS"/> provides links
to the most recent information about <xref target="CLDR"/>, both stable and specific development stages.</t>
    </section>
    <section anchor="iana-cons">
      <name>IANA Considerations</name>
      <t>IANA has created a registry called "Timestamp Suffix Tag
Keys" in a new registry group titled "Internet Date/Time Format".
Each entry in the registry shall consist of the information described in <xref target="registered"/>.
The initial contents of the registry are specified in <xref target="tab-registered"/>.</t>
      <table anchor="tab-registered">
        <name>Initial Contents of Timestamp Suffix Tag Keys Registry</name>
        <thead>
          <tr>
            <th align="left">Key Identifier</th>
            <th align="left">Registration Status</th>
            <th align="left">Description</th>
            <th align="left">Change Controller</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">u-ca</td>
            <td align="left">Permanent</td>
            <td align="left">Preferred Calendar for Presentation</td>
            <td align="left">IETF</td>
            <td align="left">
              <xref target="calendar"/> of RFC 9557</td>
          </tr>
        </tbody>
      </table>
      <t>The registration policy <xref target="BCP26"/> is "Specification Required" for
permanent entries and "Expert Review" for provisional ones.
In the second case, the experts are instructed to ascertain that a basic
specification does exist, even if not complete or published yet.</t>
      <t anchor="de-instructions">The experts are also instructed to be frugal in the allocation of
key identifiers that are suggestive of generally applicable semantics,
keeping them in reserve for suffix keys that are likely to enjoy wide
use and can make good use of the key identifier's conciseness.
If the experts become aware of key identifiers that are deployed and
in use, they may also initiate a registration on their own if
they deem such a registration can avert potential future collisions.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <section anchor="excessive-disclosure">
        <name>Excessive Disclosure</name>
        <t>The ability to include various pieces of ancillary information with a
timestamp might lead to excessive disclosure.
An example for possibly excessive disclosure is given in <xref section="7" sectionFormat="of" target="RFC3339"/>.
Similarly, divulging information about the calendar system or the
language of choice may provide more information about the originator
of a timestamp than the data minimization principle would permit
<xref target="I-D.arkko-iab-data-minimization-principle"/>.
More generally speaking, generators of IXDTF timestamps need to
consider whether information to be added to the timestamp is
appropriate to divulge to the recipients of this information and need
to err on the side of minimizing such disclosure if the set of
recipients is not under control of the originator.</t>
      </section>
      <section anchor="data-format-implementation-vulnerabilities">
        <name>Data Format Implementation Vulnerabilities</name>
        <t>As usual when extending the syntax of a data format, this can lead to
new vulnerabilities in implementations parsing and processing the
format.
No considerations are known for the IXDTF syntax that would pose
concerns that are out of the ordinary.</t>
      </section>
      <section anchor="operating-with-inconsistent-data">
        <name>Operating with Inconsistent Data</name>
        <t>Information provided in the various parts of an IXDTF string may be
        inconsistent in interesting ways, both with the extensions defined in
        this specification (for instance, see <xref target="inconsistent"/>)
        and with future extensions still to be defined.  Where consistent
        interpretation between multiple actors is required for security
        purposes (e.g., where timestamps are embedded as parameters in access
        control information), only extensions that have a well-understood and
        shared resolution of such inconsistent data can be employed.</t>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="ISO8601" to="ISO8601:1988"/>
    <displayreference target="ISO8601-2000" to="ISO8601:2000"/>
    <displayreference target="ISO8601-2019" to="ISO8601-1:2019"/>
    <displayreference target="I-D.arkko-iab-data-minimization-principle" to="DATA-MINIMIZATION"/> 

    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3339.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5234.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"/>

<referencegroup anchor="BCP26" target="https://www.rfc-editor.org/info/bcp26">
  <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
</referencegroup>

<referencegroup anchor="BCP178" target="https://www.rfc-editor.org/info/bcp178">
  <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6648.xml"/>
</referencegroup>

<referencegroup anchor="BCP175" target="https://www.rfc-editor.org/info/bcp175">
  <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6557.xml"/>
</referencegroup>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
  </references>

      <references anchor="sec-informative-references">
        <name>Informative References</name>

<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2822.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5322.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.1305.xml"/>
<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5905.xml"/>

        <reference anchor="ISO8601" target="https://www.iso.org/standard/15903.html">
          <front>
            <title>Data elements and interchange formats -- Information interchange -- Representation of dates and times</title>
            <author>
              <organization abbrev="ISO">International Organization for Standardization</organization>
            </author>
            <date year="1988" month="June"/>
          </front>
          <seriesInfo name="ISO" value="8601:1988"/>
          <annotation>Also available from <eref target="https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub4-1-1991.pdf" brackets="angle"/>.</annotation>
        </reference>

        <reference anchor="ISO8601-2000" target="https://www.iso.org/standard/26780.html">
          <front>
            <title>Data elements and interchange formats -- Information interchange -- Representation of dates and times</title>
            <author>
              <organization abbrev="ISO">International Organization for Standardization</organization>
            </author>
            <date year="2000" month="December"/>
          </front>
          <seriesInfo name="ISO" value="8601:2000"/>
        </reference>

        <reference anchor="ISO8601-2019" target="https://www.iso.org/standard/70907.html">
          <front>
            <title>Date and time -- Representations for information interchange -- Part 1: Basic rules</title>
            <author>
              <organization abbrev="ISO">International Organization for Standardization</organization>
            </author>
            <date year="2019" month="February"/>
          </front>
          <seriesInfo name="ISO" value="8601-1:2019"/>
        </reference>

        <reference anchor="ITU-R-TF.460-6" target="https://www.itu.int/rec/R-REC-TF.460/en">
          <front>
            <title>Standard-frequency and time-signal emissions</title>
            <author>
              <organization>ITU-R</organization>
            </author>
            <date year="2002" month="February"/>
          </front>
	  <seriesInfo name="ITU-R Recommendation" value="TF.460-6"/>
        </reference>

        <reference anchor="IERS" target="https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html">
          <front>
            <title>International Earth Rotation Service Bulletins</title>
            <author>
              <organization>IERS</organization>
            </author>
          </front>
        </reference>

        <reference anchor="JAVAZDT" target="https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_ZONED_DATE_TIME">
          <front>
            <title>Class DateTimeFormatter: ISO_ZONED_DATE_TIME</title>
            <author>
              <organization>Oracle</organization>
            </author>
          </front>
        </reference>

        <reference anchor="CLDR" target="https://cldr.unicode.org">
          <front>
            <title>Unicode CLDR Project</title>
            <author>
              <organization>Unicode CLDR</organization>
            </author>
          </front>
        </reference>

        <reference anchor="CLDR-LINKS" target="https://cldr.unicode.org/stable-links-info">
          <front>
            <title>Stable Links Info</title>
            <author>
              <organization>Unicode CLDR</organization>
            </author>
          </front>
        </reference>

        <reference anchor="TZDB" target="https://data.iana.org/time-zones/tz-link.html">
          <front>
            <title>Time zone and daylight saving time data</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="TZDB-NAMING" target="https://data.iana.org/time-zones/theory.html">
          <front>
            <title>Theory and pragmatics of the tz code and data</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <reference anchor="TR35" target="https://www.unicode.org/reports/tr35/#UnicodeCalendarIdentifier">
          <front>
            <title>Unicode Technical Standard #35: Unicode Locale Data Markup Language (LDML)</title>
            <author initials="M" surname="Davis" fullname="Mark Davis" role="editor">
              <organization/>
            </author>
          </front>
        </reference>

        <reference anchor="ICAO-PA" target="https://store.icao.int/annex-10-aeronautical-telecommunications-volume-ii-communication-procedures-including-those-with-pans-status">
          <front>
            <title>Annex 10 to the Convention on International Civil Aviation: Aeronautical Telecommunications; Volume II Communication Procedures including those with PANS status</title>
            <author>
              <organization>International Civil Aviation Organization</organization>
            </author>
            <date year="2016" month="July"/>
          </front>
	  <refcontent>7th ed.</refcontent>
        </reference>

<!-- [I-D.arkko-iab-data-minimization-principle] Expired -->

<xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.arkko-iab-data-minimization-principle.xml"/>

      </references>
    </references>    
<section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>This specification benefits from work prepared by ECMA TC39,
   specifically in the Temporal proposal.</t>
 
   <t><contact fullname="Richard Gibson"/> and <contact fullname="Justin
   Grant"/> provided editorial improvements.  The SEDATE WG Chairs <contact
   fullname="Mark McFadden"/> and <contact fullname="Bron Gondwana"/>, the
   latter also in his role as CALEXT WG Chair, helped set up the structures
   needed to navigate the multi-SDO environment.  <contact fullname="John
   Klensin"/> critically accompanied the development of this specification,
   which led to significant improvements.  The authors would also like to
   especially thank <contact fullname="Francesca Palombini"/> for her AD
   review and for her overall guidance during the development process.
      </t>
</section>
    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
      <name>Contributors</name>
      <contact initials="J." surname="Grant" fullname="Justin Grant">
        <organization/>
        <address>
          <email>justingrant.ietf.public@gmail.com</email>
        </address>
      </contact>
    </section>
  </back>
</rfc>
