digitalbazaar / cborld

A Javascript CBOR-LD processor for web browsers and Node.js apps.
https://json-ld.github.io/cbor-ld-spec/
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

Problems with lossless conversion of DateTime string using XsdDateTimeCodec #21

Closed tplooker closed 3 years ago

tplooker commented 3 years ago

It appears the XsdDateTimeCodec is encoding a valid date time string as Unix Epoch and then decoding it in accordance with ISO 8601. However if the input string features only a Date component i.e '2021-02-22' upon encoding and then decoding the returned value becomes 2021-02-22T00:00:00Z hence it is not lossless.

dlongley commented 3 years ago

Should be fixed by PR #34.