-
-
Notifications
You must be signed in to change notification settings - Fork 20
node red
Åke Hedman edited this page Aug 17, 2021
·
21 revisions
VSCP event have date and time set in UTC to be universally usable. To get local time you have to convert this UTC time to a local time. But don't despair the conversion is easy.
Add a function node in the flow from the MQTT broker with the following content
var utcDate = msg.payload.vscpDateTime;
msg.payload.localtime = new Date(utcDate);
return msg;
you will now have the localtime in msg.payload.localtime and can
The VSCP Project (https://www.vscp.org) - Copyright © 2000-2024 Åke Hedman, the VSCP Project