I'm working on a flow that is chopping up a data feed and pushing it into influxDB to use for visual monitoring and alerts. For my previous uses, I had simply been generating a timestamp at the time the message is sent out using
timestamp: new Date(). I think this could be done better, though, since the data feed I'm getting is just chock full of time stamp information. Example below:
I was considering just grabbing the first timestamp (20180912102253) as a string, inserting the symbols necessary to make that into rfc3339 format, running the result through a function to subtract the time differential (because these are UTC-5, not zulu) and calling it good but honestly that feels kind of like a kludge.
Is there a more elegant way to grab that timestamp that anyone would recommend?