diff --git a/lib/asn1.js b/lib/asn1.js index dc94496..2377440 100644 --- a/lib/asn1.js +++ b/lib/asn1.js @@ -997,7 +997,7 @@ const decodeBacnetDatetime = (buffer, offset) => { len += time.len; return { len: len, - value: new Date(date.year, date.month, date.day, time.hour, time.minute, time.second, time.millisecond) + value: new Date(date.value.value.getFullYear(), date.value.value.getMonth() -1 , date.value.value.getDate(), time.value.value.getHours(), time.value.value.getMinutes(), time.value.value.getSeconds(), time.value.value.getMilliseconds())}; }; };