Thanks Colin, quick follow-up question
Problem with that idea is that I need to collect the date and time from Dashboard. The time picker (in text input) sends back milliseconds since midnight, which I add to the number of milliseconds provided by the date picker. So let's say I selected a date and time during winter (UTC) then it would need to know not to add the hour, but in summer (UTC+1) it would need to add that hour.
Hence thinking I would need to feed milliseconds into a date-aware thing like momentJS.
Yes there's the ability to set "Time Precision" in Influx node
Yes it does, I feed InfluxDB from a number of other sources in NodeRED and it works well, UTC is inserted to the database and Grafana corrects for BST.
Here's what I'm sending in:
if (msg.time != 'undefined' && msg.date != 'undefined') {
datetime = msg.time+msg.date
msg.payload.time = new Date(datetime)
}
(msg.time and msg.date are fed by a submit button which reads from the Dashboard text node (set to time picker) and the Dashboard date picker node.
Hope that makes sense
Any clues on how to make this work, could be using MomentJS or any other way