TotallyInformation / node-red-contrib-moment

Node-Red Node that produces formatted Date/Time output using the Moment.JS library. Timezone, dst and locale aware.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output Format "date" and "jsDate" gives identical output as left open

StephanStS opened this issue · comments

If you set the configuration property Output Format to date or jsDate, the output is always Zulu format.
I assume that the underlying call moment().toDate() shall give a different output format.

using date or jsDate should give the same output, namely ISO8601. That format always outputs in Zulu (AKA UTC or GMT) time as per the standard.

Argh! Node-RED playing tricks on me! The output is not what it seems.

The output for date and jsDate ARE the same - both are JavaScript date objects. My test routine was auto-converting them to ISO format which is the default .toString for a JavaScript Date object.

So the outcome you are seeing is the expected outcome.