From f4a4c0f2bb2eb562e6cd2ce0bd33972083722426 Mon Sep 17 00:00:00 2001 From: cdriks <114493602+cdriks@users.noreply.github.com> Date: Thu, 3 Nov 2022 15:14:06 +0100 Subject: [PATCH] fix month value for acknowledge --- lib/asn1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); };