clj-cbor.tags.time
Built-in tag support for the time extensions in RFC 7049. See section 2.4.1.
This namespace offers interop with both the older java.util.Date
class as well as the newer java.time.Instant
. Support for both timestamp-based tagged values and the more efficient epoch-based values is included.
epoch-time-tag
Tag value 1 is for numerical representation of seconds relative to 1970-01-01T00:00Z in UTC time.
The tagged item can be a positive or negative integer (major types 0 and 1), or a floating-point number (major type 7 with additional information 25, 26, or 27). Note that the number can be negative (time before 1970-01-01T00:00Z) and, if a floating-point number, indicate fractional seconds.
instant-read-handlers
Map of tag handlers to parse date-times as java.time.Instant
values.
string-time-tag
Tag value 0 is for date/time strings that follow the standard format described in RFC3339, as refined by Section 3.3 of RFC4287.