rfc8943xml2.original.xml   rfc8943.xml 
<?xml version='1.0' encoding='UTF-8'?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?xml-stylesheet type='text/xsl' href='http://xml2rfc.tools.ietf.org/authoring/r
fc2629.xslt' ?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902"
<?rfc tocompact="yes"?> docName="draft-ietf-cbor-date-tag-07" number="8943" obsoletes=""
<?rfc tocdepth="4"?> updates="" submissionType="IETF" category="std" consensus="true"
<?rfc tocindent="yes"?> xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true"
<?rfc symrefs="yes"?> sortRefs="true" version="3">
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" <!-- xml2rfc v2v3 conversion 3.1.1 -->
ipr="trust200902"
docName="draft-ietf-cbor-date-tag-07">
<front> <front>
<title abbrev="CBOR Tags for Date">Concise Binary Object Representation (CBO
<title abbrev="CBOR Tag for Date">Concise Binary Object Representation (CBOR R) Tags for Date</title>
) Tags for Date</title> <seriesInfo name="RFC" value="8943"/>
<author fullname="Michael B. Jones" surname="Jones" initials="M.">
<author fullname="Michael B. Jones" surname="Jones" initials="M.B.">
<organization>Microsoft</organization> <organization>Microsoft</organization>
<address> <address>
<email>mbj@microsoft.com</email> <email>mbj@microsoft.com</email>
<uri>https://self-issued.info/</uri> <uri>https://self-issued.info/</uri>
</address> </address>
</author> </author>
<author fullname="Anthony Nadalin" initials="A." surname="Nadalin"> <author fullname="Anthony Nadalin" initials="A." surname="Nadalin">
<organization>Independent</organization> <organization>Independent</organization>
<address> <address>
<email>nadalin@prodigy.net</email> <email>nadalin@prodigy.net</email>
</address> </address>
</author> </author>
<author fullname="Jörg Richter" initials="J." surname="Richter"> <author fullname="Jörg Richter" initials="J." surname="Richter">
<organization>pdv Financial Software GmbH</organization> <organization>pdv Financial Software GmbH</organization>
<address> <address>
<email>joerg.richter@pdv-fs.de</email> <email>joerg.richter@pdv-fs.de</email>
</address> </address>
</author> </author>
<date month="November" year="2020"/>
<date day="10" month="September" year="2020" />
<area>Applications</area> <area>Applications</area>
<workgroup>CBOR Working Group</workgroup> <workgroup>CBOR Working Group</workgroup>
<keyword>Compact Binary Object Representation</keyword> <keyword>Compact Binary Object Representation</keyword>
<keyword>CBOR</keyword> <keyword>CBOR</keyword>
<keyword>Tag</keyword> <keyword>Tag</keyword>
<keyword>Date</keyword> <keyword>Date</keyword>
<keyword>Internet-Draft</keyword>
<abstract> <abstract>
<t> <t>
The Concise Binary Object Representation (CBOR, RFC 7049) is a data The Concise Binary Object Representation (CBOR), as specified in RFC
format whose design goals include the possibility of extremely small 7049, is a data format whose design goals include the possibility of
code size, fairly small message size, and extensibility without the extremely small code size, fairly small message size, and
need for version negotiation. extensibility without the need for version negotiation.
</t> </t>
<t> <t>
In CBOR, one point of extensibility is the definition of CBOR tags. In CBOR, one point of extensibility is the definition of CBOR tags.
RFC 7049 defines two tags for time: RFC 7049 defines two tags for time:
CBOR tag 0 (RFC 3339 date/time string) CBOR tag 0 (date/time string as per RFC 3339)
and tag 1 (Posix "seconds since the epoch"). and tag 1 (POSIX "seconds since the epoch").
Since then, additional requirements have become known. Since then, additional requirements have become known.
This specification defines a CBOR tag for an RFC 3339 date text string, This specification defines a CBOR tag for a date text string (as
per RFC 3339)
for applications needing a textual date representation for applications needing a textual date representation
within the Gregorian calendar without a time. within the Gregorian calendar without a time.
It also defines a CBOR tag for days since the date 1970-01-01 in the Greg orian calendar It also defines a CBOR tag for days since the date 1970-01-01 in the Greg orian calendar
for applications needing a numeric date representation without a time. for applications needing a numeric date representation without a time.
This specification is intended as the reference document for IANA registr ation This specification is the reference document for IANA registration
of the CBOR tags defined. of the CBOR tags defined.
</t> </t>
</abstract> </abstract>
</front> </front>
<middle> <middle>
<section anchor="Introduction" title="Introduction"> <section anchor="Introduction" numbered="true" toc="default">
<name>Introduction</name>
<t> <t>
The Concise Binary Object Representation (CBOR) <xref target="RFC7049"/> The Concise Binary Object Representation (CBOR) <xref target="RFC7049" fo rmat="default"/>
provides for the interchange of structured data provides for the interchange of structured data
without a requirement for a pre-agreed schema. without a requirement for a pre-agreed schema.
RFC 7049 defines a basic set of data types, as well as a tagging mechanis m RFC 7049 defines a basic set of data types, as well as a tagging mechanis m
that enables extending the set of data types supported via an IANA regist ry. that enables extending the set of data types supported via an IANA regist ry.
</t> </t>
<t> <t>
This specification defines a CBOR tag for a text string representing a da te without a time. This specification defines a CBOR tag for a text string representing a da te without a time.
The tagged text string is represented as specified by the RFC 3339 <xref The tagged text string is represented as specified by the RFC 3339 <xref
target="RFC3339"/> target="RFC3339" format="default"/>
<spanx style="verb">full-date</spanx> production. <tt>full-date</tt> production.
Per RFC 3339, this represents a date within the Gregorian calendar. Per RFC 3339, this represents a date within the Gregorian calendar.
</t> </t>
<t> <t>
This specification also defines a CBOR tag for an integer representing a date without a time. This specification also defines a CBOR tag for an integer representing a date without a time.
The tagged integer is an unsigned or negative value indicating the number of days The tagged integer is an unsigned or negative value indicating the number of days
since the Gregorian calendar date 1970-01-01. since the Gregorian calendar date 1970-01-01.
As an implementation note, this value has a constant offset from the Modi fied Julian Date value As an implementation note, this value has a constant offset from the Modi fied Julian Date value
(which is defined by the Smithsonian Astrophysical Observatory as the num ber of days since (which is defined by the Smithsonian Astrophysical Observatory as the num ber of days since
November 17, 1858); this value is the Modified Julian Date minus 40587. November 17, 1858); this value is the Modified Julian Date minus 40587.
</t> </t>
<t> <t>
Note that since both tags are for dates without times, Note that since both tags are for dates without times,
times of day, time zones, and leap seconds are not applicable to these va lues. times of day, time zones, and leap seconds are not applicable to these va lues.
These tags are both for representations of Gregorian calendar dates. These tags are both for representations of Gregorian calendar dates.
</t> </t>
<section anchor="CalendarDates" numbered="true" toc="default">
<!-- No RFC 2119 keywords are used in this document. <name>Calendar Dates</name>
<section anchor="rnc" title="Requirements Notation and Conventions">
<t> <t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
only when, they appear in all capitals, as shown here.
</t>
</section>
<section anchor="CalendarDates" title="Calendar Dates">
<t>
Calendar dates are used for numerous human use cases, Calendar dates are used for numerous human use cases,
such as marking the dates of significant events. such as marking the dates of significant events.
For instance, John Lennon was born on October 9, 1940 and died on Decem ber 8, 1980. For instance, John Lennon was born on October 9, 1940 and died on Decem ber 8, 1980.
One such use case is driver's licenses, which typically include a date of birth. One such use case is driver's licenses, which typically include a date of birth.
The dates used in this specification use the Gregorian calendar, The dates used in this specification use the Gregorian calendar,
as do those in RFC 3339 <xref target="RFC3339"/>. as do those in RFC 3339 <xref target="RFC3339" format="default"/>.
The time zones and actual times of these events are intentionally not r epresented in the calendar date. The time zones and actual times of these events are intentionally not r epresented in the calendar date.
</t> </t>
<t> <t>
The epoch chosen for the second tag, which represents days since the Gr The epoch chosen for the second tag, which represents days since the
egorian calendar date 1970-01-01, Gregorian calendar date 1970-01-01, is related to the IEEE Std
is related to the <xref target="POSIX.1">IEEE Std 1003.1, 2013 Edition< 1003.1, 2013 Edition <xref target="POSIX.1" format="default"></xref> ti
/xref> time epoch me epoch
1970-01-01T00:00:00Z UTC only insofar as both contain the date 1970-01- 01. 1970-01-01T00:00:00Z UTC only insofar as both contain the date 1970-01- 01.
This should not be construed as indicating that dates using this tag This should not be construed as indicating that dates using this tag
represent either a specific time of day and/or time zone. represent either a specific time of day and/or time zone.
</t> </t>
<t> <t>
The day of the week (Sunday, Monday, Tuesday, etc.) is not explicitly r epresented The day of the week (Sunday, Monday, Tuesday, etc.) is not explicitly r epresented
in either of these date formats. in either of these date formats.
However, deterministic algorithms that are beyond the scope of this spe cification However, deterministic algorithms that are beyond the scope of this spe cification
can be used to derive the day of the week in the Gregorian calendar can be used to derive the day of the week in the Gregorian calendar
from dates represented in both of these formats. from dates represented in both of these formats.
</t> </t>
<section anchor="Examples" numbered="true" toc="default">
<section anchor="Examples" title="Example Date Representations"> <name>Example Date Representations</name>
<t> <t>
This table contains example representations for dates using both tags . This table contains example representations for dates using both tags .
</t> </t>
<table align="center">
<texttable> <thead>
<tr>
<ttcol align="left">Date</ttcol> <th align="left">Date</th>
<ttcol align="left">Tag 1004</ttcol> <th align="left">Tag 1004</th>
<ttcol align="left">Tag 100</ttcol> <th align="left">Tag 100</th>
</tr>
<c>October 9, 1940</c> </thead>
<c>"1940-10-09"</c> <tbody>
<c>-10676</c> <tr>
<td align="left">October 9, 1940</td>
<c>December 8, 1980</c> <td align="left">"1940-10-09"</td>
<c>"1980-12-08"</c> <td align="left">-10676</td>
<c>3994</c> </tr>
<tr>
</texttable> <td align="left">December 8, 1980</td>
</section> <td align="left">"1980-12-08"</td>
<td align="left">3994</td>
</tr>
</tbody>
</table>
</section>
</section> </section>
<section anchor="ComparingDates" numbered="true" toc="default">
<section anchor="ComparingDates" title="Comparing Dates"> <name>Comparing Dates</name>
<t> <t>
Comparison of dates in <spanx style="verb">full-date</spanx> format can Comparison of dates in <tt>full-date</tt> format can be accomplished by
be accomplished by normal string comparison, since, by design, the digits representing the
normal string comparison, since by design, the digits representing the date are in fixed format
date are in fixed format
and ordered from most significant to least significant. and ordered from most significant to least significant.
Comparison of numeric dates representing days since 1970-01-01 can be p erformed by Comparison of numeric dates representing days since 1970-01-01 can be p erformed by
normal integer comparison. normal integer comparison.
Comparison of dates in other formats or using other calendars require c onversions Comparison of dates in other formats or using other calendars require c onversions
that are beyond the scope of this specification. that are beyond the scope of this specification.
</t> </t>
<t> <t>
Note that different dates may correspond to the same moment in time, Note that different dates may correspond to the same moment in time,
depending upon the time zone in which the date was determined. depending upon the time zone in which the date was determined.
For instance, at many times of the day, a conference call occurring For instance, at many times of the day, a conference call occurring
on a particular date in Japan will simultaneously occur on a particular date in Japan will simultaneously occur
on the previous date in Hawaii; on the previous date in Hawaii;
at many times of the day, Japan's Friday corresponds with Hawaii's Thur sday. at many times of the day, Japan's Friday corresponds with Hawaii's Thur sday.
</t> </t>
</section> </section>
<section anchor="ComparingDatesAndTimes" numbered="true" toc="default">
<section anchor="ComparingDatesAndTimes" title="Comparing Dates and Date/T <name>Comparing Dates and Date/Time Values</name>
ime Values"> <t>
<t>
Comparing dates with date/time values, which represent a particular mom ent in time, Comparing dates with date/time values, which represent a particular mom ent in time,
is beyond the scope of this specification. is beyond the scope of this specification.
That said, if a date is augmented with a time zone and time of day, That said, if a date is augmented with a time zone and time of day,
a specific date/time value can be determined and a specific date/time value can be determined, and
comparing that date/time value to others becomes possible. comparing that date/time value to others becomes possible.
For instance, if one were to augment John Lennon's birth date For instance, if one were to augment John Lennon's birth date
of October 9, 1940 with the time of day and time zone of his birth, of October 9, 1940 with the time of day and time zone of his birth,
then it would be possible to derive a date/time at which he was born then it would be possible to derive a date/time at which he was born
that could be compared with other date/time values. that could be compared with other date/time values.
</t> </t>
</section> </section>
</section> </section>
<section anchor="IANA" numbered="true" toc="default">
<section anchor="IANA" title="IANA Considerations"> <name>IANA Considerations</name>
<section anchor="cose-algorithms-registrations" numbered="true" toc="defau
<section anchor="cose-algorithms-registrations" title="Concise Binary Obje lt">
ct Representation (CBOR) Tags Registrations"> <name>Concise Binary Object Representation (CBOR) Tags Registrations</na
me>
<t> <t>
This section registers the following values in the This section registers the following values in the
IANA "Concise Binary Object Representation (CBOR) Tags" registry <xref IANA "Concise Binary Object Representation (CBOR) Tags" registry <xref
target="IANA.cbor-tags"/>. target="IANA.cbor-tags" format="default"/>.
</t> </t>
<t> <dl newline="false" spacing="compact">
<?rfc subcompact="yes"?> <dt>Tag:</dt>
<list style='symbols'> <dd>1004</dd>
<t> <dt>Data Item:</dt>
Tag: 1004 <dd>UTF-8 text string</dd>
</t> <dt>Semantics:</dt>
<t> <dd><xref target="RFC3339"/> full-date string</dd>
Data Item: UTF-8 text string <dt>Reference:</dt>
</t> <dd>RFC 8943</dd>
<t> </dl>
Semantics: RFC 3339 full-date string <dl newline="false" spacing="compact">
</t> <dt>Tag:</dt>
<t> <dd>100 (ASCII 'd')</dd>
Reference: [[ this specification ]] <dt>Data Item:</dt>
</t> <dd>Unsigned or negative integer</dd>
</list> <dt>Semantics:</dt>
</t> <dd>Number of days since the epoch date 1970-01-01</dd>
<t> <dt>Reference:</dt>
<list style='symbols'> <dd>RFC 8943</dd>
<t> </dl>
Tag: 100 (ASCII 'd')
</t>
<t>
Data Item: Unsigned or negative integer
</t>
<t>
Semantics: Number of days since the epoch date 1970-01-01
</t>
<t>
Reference: [[ this specification ]]
</t>
</list>
</t>
<?rfc subcompact="no"?>
</section> </section>
</section> </section>
<section anchor="Security" numbered="true" toc="default">
<section anchor="Security" title="Security Considerations"> <name>Security Considerations</name>
<t> <t>
The security considerations of RFC 7049 apply; the tags introduced The security considerations of RFC 7049 apply; the tags introduced
here are not expected to raise security considerations beyond those. here are not expected to raise security considerations beyond those.
</t> </t>
<t> <t>
A date, of course, has significant security considerations. A date, of course, has significant security considerations.
These include the exploitation of ambiguities where the date is security relevant These include the exploitation of ambiguities where the date is security relevant
or where the date is used in access control decisions. or where the date is used in access control decisions.
</t> </t>
<t> <t>
When using a calendar date for decision making, for example access contro l, When using a calendar date for decision making (for example, access contr ol),
it needs to be noted that since calendar dates do not represent a specifi c point in time, it needs to be noted that since calendar dates do not represent a specifi c point in time,
the results of the evaluation can differ depending upon where the decisio n is made. the results of the evaluation can differ depending upon where the decisio n is made.
For instance, a person may have reached their 21st birthday in Japan For instance, a person may have reached their 21st birthday in Japan
while simultaneously being a day short of their 21st birthday in Hawaii. while simultaneously being a day short of their 21st birthday in Hawaii.
Similarly, it would be inappropriate to use only a date to trigger certif icate expiration, Similarly, it would be inappropriate to use only a date to trigger certif icate expiration,
since a date corresponds to a range of times worldwide, since a date corresponds to a range of times worldwide
rather than a specific point in time that is independent of geographic lo cation. rather than a specific point in time that is independent of geographic lo cation.
</t> </t>
</section> </section>
</middle> </middle>
<back> <back>
<references title="Normative References"> <displayreference target="I-D.bormann-cbor-time-tag" to="TIME-TAGS"/>
<references>
<!-- <?rfc include="reference.RFC.2119.xml"?> --> <name>References</name>
<?rfc include="reference.RFC.3339.xml"?> <references>
<?rfc include="reference.RFC.7049.xml"?> <name>Normative References</name>
<!-- <?rfc include="reference.RFC.8174.xml"?> --> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC
.3339.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC
.7049.xml"/>
</references> </references>
<references>
<references title="Informative References"> <name>Informative References</name>
<reference anchor="IANA.cbor-tags" target="http://www.iana.org/assignments <reference anchor="IANA.cbor-tags" target="https://www.iana.org/assignme
/cbor-tags"> nts/cbor-tags">
<front> <front>
<title>Concise Binary Object Representation (CBOR) Tags</title> <title>Concise Binary Object Representation (CBOR) Tags</title>
<author> <author>
<organization>IANA</organization> <organization>IANA</organization>
</author> </author>
<date/> </front>
</front> </reference>
</reference>
<reference anchor="POSIX.1" target="http://pubs.opengroup.org/onlinepubs/9 <reference anchor="POSIX.1" target="https://pubs.opengroup.org/onlinepub
699919799/basedefs/V1_chap04.html#tag_04_15"> s/9699919799.2013edition">
<front> <front>
<title>The Open Group Base Specifications Issue 7</title> <title>The Open Group Base Specifications Issue 7</title>
<author> <author>
<organization>IEEE</organization> <organization>IEEE</organization>
</author> </author>
<date year="2013"/> <date year="2013"/>
</front> </front>
<seriesInfo name="IEEE" value="Std 1003.1, 2013 Edition"/> <seriesInfo name="IEEE" value="Std 1003.1"/>
</reference> <refcontent>2013 Edition</refcontent>
</reference>
<!-- draft-bormann-cbor-time-tag-03: Expired Internet Draft-->
<xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.
bormann-cbor-time-tag-03.xml"/>
</references>
</references> </references>
<section anchor="Acknowledgements" numbered="false" toc="default">
<section title="Acknowledgements" anchor="Acknowledgements" numbered="no"> <name>Acknowledgements</name>
<t> <t>
Thanks to Carsten Bormann for supporting creation of this specification. Thanks to <contact fullname="Carsten Bormann"/> for supporting creation o
Parts of the explanatory text in this specification come from draft-borma f this specification.
nn-cbor-time-tag-02. Parts of the explanatory text in this specification come from <xref
target="I-D.bormann-cbor-time-tag"></xref>.
</t> </t>
<t> <t>
Thanks to these people for reviews of the specification: Thanks to these people for reviews of the specification:
Henk Birkholz, <contact fullname="Henk Birkholz"/>,
Carsten Bormann, <contact fullname="Carsten Bormann"/>,
Samita Chakrabarti, <contact fullname="Samita Chakrabarti"/>,
Roman Danyliw, <contact fullname="Roman Danyliw"/>,
Linda Dunbar, <contact fullname="Linda Dunbar"/>,
Benjamin Kaduk, <contact fullname="Benjamin Kaduk"/>,
Erik Kline, <contact fullname="Erik Kline"/>,
Warren Kumari, <contact fullname="Warren Kumari"/>,
Barry Leiba, <contact fullname="Barry Leiba"/>,
Thiago Macieira, <contact fullname="Thiago Macieira"/>,
Francesca Palombini, <contact fullname="Francesca Palombini"/>,
Michael Richardson, <contact fullname="Michael Richardson"/>,
Kyle Rose, <contact fullname="Kyle Rose"/>,
Jim Schaad, <contact fullname="Jim Schaad"/>,
Jürgen Schönwälder, <contact fullname="Juergen Schoenwaelder"/>,
Éric Vyncke, <contact fullname="Éric Vyncke"/>,
Robert Wilton, <contact fullname="Robert Wilton"/>,
and and
Dale Worley. <contact fullname="Dale Worley"/>.
</t>
</section>
<section title="Document History" anchor="History">
<t>
[[ to be removed by the RFC Editor before publication as an RFC ]]
</t>
<t>
-07
<list style='symbols'>
<t>
Acknowledged Linda Dunbar for her GenArt review and Samita Chakrabart
i for her IOT-Dir review,
as well as IESG reviewers.
</t>
</list>
</t>
<t>
-06
<list style='symbols'>
<t>
Addressed SecDir review comments by Kyle Rose.
</t>
<t>
Updated Tony Nadalin's affiliation and contact information.
</t>
</list>
</t>
<t>
-05
<list style='symbols'>
<t>
Incorporated additional suggestions by Carsten Bormann and Juergen Sc
hoenwaelder.
</t>
</list>
</t>
<t>
-04
<list style='symbols'>
<t>
Addressed shepherd comments by Francesca Palombini.
</t>
<t>
Addressed additional review comments by Jim Schaad and Michael Richar
dson.
</t>
</list>
</t>
<t>
-03
<list style='symbols'>
<t>
Added statement that these tags are both for representations of calen
dar dates.
</t>
<t>
Described consequences of using calendar dates in access control deci
sions.
</t>
</list>
</t>
<t>
-02
<list style='symbols'>
<t>
Addressed working group last call comments,
including stating that time zones are not applicable to these values.
</t>
</list>
</t>
<t>
-01
<list style='symbols'>
<t>
Changed "positive or negative" to "unsigned or negative".
</t>
<t>
Added an implementation note about the relationship to Modified Julia
n Dates.
</t>
</list>
</t>
<t>
-00
<list style='symbols'>
<t>
Initial working group version based on draft-jones-cbor-date-tag-01 w
ith no normative changes.
</t>
</list>
</t> </t>
</section> </section>
</back> </back>
</rfc> </rfc>
 End of changes. 52 change blocks. 
310 lines changed or deleted 176 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/