You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sent time synchronization with current date, but a day of last month is sent.
Current date is April 13, 2021.
sample code:
const bacnet = require('node-bacnet');
const client = new bacnet();
client.timeSync(MY_DEVICE_IP, new Date());
// MY_DEVICE_IP is actually a valid IP
Expected Behaviour (Bug Report)
I expected timeSynchronization with "Date: April 13, 2021," is sent, but timeSynchronization with "Date: March 13, 2021," is sent
Suspicious code
In JavaScript, the getMonth() method returns the month from 0 to 11.
If library sends it as is, it means last month's data in the BACnet protocol.
So it need call getMonth() + 1 to create buffer in encodeBacnetDate.
Node Version:
12.20.0
Node BACstack Version:
0.2.4
Current Behaviour (Bug Report)
I sent time synchronization with current date, but a day of last month is sent.
Current date is April 13, 2021.
sample code:
Expected Behaviour (Bug Report)
I expected timeSynchronization with "Date: April 13, 2021," is sent, but timeSynchronization with "Date: March 13, 2021," is sent
Suspicious code
In JavaScript, the getMonth() method returns the month from 0 to 11.
If library sends it as is, it means last month's data in the BACnet protocol.
So it need call getMonth() + 1 to create buffer in encodeBacnetDate.
code to be fixed:
node-bacstack/lib/asn1.js
Line 322 in 5e22199
The text was updated successfully, but these errors were encountered: