Updated 2021-07-07 !
Sometimes the syntax for the Javascript in Node-Red is a little hard to get,
despite some Googling. This was evident when i tried the run the "node-red-node-mysql" node inserting data in a MySQL database.
Also timestamps in different environments are a little complicated.
So this post will cover both areas with some code examples done on a
Raspberry Pi.