Concise Binary Object Representation (CBOR) Tags for Date
Microsoft
mbj@microsoft.com
https://self-issued.info/
Microsoft
tonynad@microsoft.com
pdv Financial Software GmbH
joerg.richter@pdv-fs.de
Applications
CBOR Working Group
Compact Binary Object Representation
CBOR
Tag
Date
Internet-Draft
The Concise Binary Object Representation (CBOR, RFC 7049) is a data
format whose design goals include the possibility of extremely small
code size, fairly small message size, and extensibility without the
need for version negotiation.
In CBOR, one point of extensibility is the definition of CBOR tags.
RFC 7049 defines two tags for time:
CBOR tag 0 (RFC 3339 date/time string)
and tag 1 (Posix "seconds since the epoch").
Since then, additional requirements have become known.
This specification defines a CBOR tag for an RFC 3339 date text string,
for applications needing a textual date representation without a time.
It also defines a CBOR tag for days since the Posix epoch,
for applications needing a numeric date representation without a time.
It is intended as the reference document for the IANA registration
of the CBOR tags defined.
The Concise Binary Object Representation (CBOR)
provides for the interchange of structured data
without a requirement for a pre-agreed schema.
RFC 7049 defines a basic set of data types, as well as a tagging mechanism
that enables extending the set of data types supported via an IANA registry.
This specification defines a CBOR tag for a text string representing a date but not a time.
The tagged text string is represented as specified by the RFC 3339
full-date production.
This specification also defines a CBOR tag for an integer representing a date but not a time.
The tagged integer is an unsigned or negative value indicating the number of days
since the IEEE Std 1003.1, 2013 Edition epoch date 1970-01-01.
As an implementation note, this value has a constant offset from the Modified Julian Date value
(which is defined by the Smithsonian Astrophysical Observatory as the number of days since
November 17, 1858); this value is the Modified Julian Date minus 40,587.
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 when, and
only when, they appear in all capitals, as shown here.
This section registers the following values in the
IANA "Concise Binary Object Representation (CBOR) Tags" registry .
Tag: 1004 (value requested)
Data Item: UTF-8 text string
Semantics: RFC 3339 full-date string
Reference: [[ this specification ]]
Tag: 100 (ASCII 'd') (value requested)
Data Item: Unsigned or negative integer
Semantics: Number of days since the epoch date 1970-01-01
Reference: [[ this specification ]]
The security considerations of RFC 7049 apply; the tags introduced
here are not expected to raise security considerations beyond those.
A date, of course, has significant security considerations;
these include the exploitation of ambiguities where the date is security relevant
or where the date is used in access control decisions.
Concise Binary Object Representation (CBOR) Tags
IANA
The Open Group Base Specifications Issue 7
IEEE
Thanks to Carsten Bormann for supporting creation of this specification.
Parts of the explanatory text in this specification come from draft-bormann-cbor-time-tag-02.
[[ to be removed by the RFC Editor before publication as an RFC ]]
-01
Changed "positive or negative" to "unsigned or negative".
Added an implementation note about the relationship to Modified Julian Dates.
-00
Initial working group version based on draft-jones-cbor-date-tag-01 with no normative changes.