Usually if I want timestamp as a string I need something meaningful, which is local time. I am not living in the UK, hence UTC usually is not helpful.
So far I would use an inject node followed by a function node:
msg.payload = new Date().toLocaleString()
return msg;
So, I'd vote for possibility to have local time. Offering UTC is a nice option, too.
For anyone interested, I'm continuing work on this feature on my live stream now - Twitch
I spent 10 minutes going in circles over what options to include before throwing the towel in and moving on to something more productive.
I'm sure there's a good answer to be had that balances all of the feedback received - but I also think it's going to involve improving our timezone/locale handling more generally.
To control regular daily activities I use the date formatter node's hh:mm:ss in local time and split and multiply this in a function node to create milliseconds past midnight. This takes three simple nodes. Is it worth making a drop down which is potentially more complicated and confusing than three nodes?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.