Open uroshercog opened 5 years ago
Issue The time in the packets is not encoded in a way that the OER document under RFCs suggests: If the millisecond part is zero, it MUST be left out. Trailing zeros in the millisecond part MUST be left out. (OER Notes)
If the millisecond part is zero, it MUST be left out. Trailing zeros in the millisecond part MUST be left out.
Code to reproduce
import dateFormat = require('dateformat'); const fn = d => Buffer.from(dateFormat(d, "UTC:yyyymmddHHMMss.l'Z'")).toString(); console.log(fn(new Date('2017-08-28T18:32:00.000Z'))); console.log(fn(new Date('2017-08-28T18:32:00.010Z'))); console.log(fn(new Date('2017-08-28T18:32:00.100Z')));
Results 20170828183200.000Z should be 20170828183200Z 20170828183200.010Z should be 20170828183200.01Z 20170828183200.100Z should be 20170828183200.1Z
20170828183200.000Z
20170828183200Z
20170828183200.010Z
20170828183200.01Z
20170828183200.100Z
20170828183200.1Z
Issue The time in the packets is not encoded in a way that the OER document under RFCs suggests:
If the millisecond part is zero, it MUST be left out. Trailing zeros in the millisecond part MUST be left out.
(OER Notes)Code to reproduce
Results
20170828183200.000Z
should be20170828183200Z
20170828183200.010Z
should be20170828183200.01Z
20170828183200.100Z
should be20170828183200.1Z