diff --git a/lib/asn1.js b/lib/asn1.js index dc94496..b08c3d5 100644 --- a/lib/asn1.js +++ b/lib/asn1.js @@ -313,7 +313,7 @@ const encodeBacnetDate = (buffer, value) => { } else { return; } - buffer.buffer[buffer.offset++] = value.getMonth(); + buffer.buffer[buffer.offset++] = value.getMonth() + 1; buffer.buffer[buffer.offset++] = value.getDate(); buffer.buffer[buffer.offset++] = (value.getDay() === 0) ? 7 : value.getDay(); };