Convert the time input to local time zone in node red through moment function

The Dashboard text input set to time uses type="time" on the input field so returned value should be a string - however, Dashboard converts it to a number. So entering "00:01" returns 60000. I'd never spotted this previously as I don't generally use Dashboard.

I would actually say that the return from the text input node for time type may be incorrect? That's because if, for example, in the UK you entered 08:00 on March 27th this year, you should get a value of 25200000 (because the clocks go forward 1 hour at 1am so you lose an hour) but I suspect you might get a value of 28800000. However, I can't really test that until March 27th so I don't know for sure. It would actually be much clearer if the native HH:mm or HH:mm:ss string format were returned so that you could correctly choose what to do with it depending on your needs.

Other than that issue, the return value is just a ms from midnight value so it isn't relevant whether it is a local or UTC input. Effectively it is a local value but you need to make sure that you correctly allow for it when you combine the date and time. You should combine them as a local date-time value. JavaScript mostly likes to work in UTC (which is generally correct, you should do date/time calculations and store values in UTC in order to avoid the issues of timezone and DST changes). But input from and output to real people should normally be in local time.

There is, however, another input type type="datetime-local" which combines date and time input to a single input. It isn't supported by IE.

It would be worth nicely asking @dceejay if he wouldn't mind adding the datetime-local type in the next release of Dashboard :grinning: - that would also avoid these issues.