Debug sidebar has a very nice feature for values that look like unix timestamps, where you can click on it and immediately translate to human readable date. I should say human readable-ish, because I get horrendous formatting like M/dd/YYYY, h:mm:ss AM/PC [UTC+1]. So this is instant headache and potential source of bugs based on misunderstanding. So this must be a browser things sure? No possible fix in any browser I tried edge, chrome, firefox. But surely a plugin? Nah. But OS datetime format? Already have that set up in Windows 11 so clock shows YYYY-MM-dd. But somehow somewhere OS language is picked up. I prefer english language, possibly US or GB. But I never want those langauges to apply formatting! Anyone have a simple fix for this? Whenever I google browser formatting, it shows this is a discussed problem for years, but no solution.
It is such a pain I wish perhaps node red could take control and overwrite it regardless of browser/OS regional language format settings.
I am not sure what you are asking for. Are you asking for node-red in the debug tab showing a timestamp, to not let the browser convert to the local time format for you but have a way of configuring node-red to show it in the format that you want?
For me, in the uk, when I click on the timestamp in the debug pane it shows ISO mode and then 19/03/2026, 11:29:49 [UTC0] which is what I expect when seeing local time format.
Yeah preferably wish toconfigure node red to hardcode date format on local time, or it used some sensible format and regardless ignore browser and/or OS language. Because no where I look can I find a way to solve this. It works on my work laptop because I set windows language to Swedish (!) which has a nice date format that propagates into browser's locale, but it has some other consequences of getting swedish weekdays some times.
Asked chatgpt about it and it was insistant that browser couldn't solve this at all, and the only way to fix it was in source code
I enjoy seeing this: 2026-03-19T13:52:09.994Z
But I hate seeing this: 19/03/2026, 11:29:49 [UTC0]
Or even this (which I see at home): 3/19/2026, 9:15:41 AM [UTC+1]
You have the luxury of having same local time as UTC
The windows clock is adjusted correctly so assumed that configuration didn't have effect in browser/nr. So worst case it just reads windows language and defines format based on that. I don't want to change language on my home pc. Or I would have to go down the rabbit hole again and see which language is closest to english and still has sensible default date format.
The time is certainly correct, but horrendous formatting. And I have no hope of browsers allowing to configure this, at least it has never worked for firefox, chrome an edge so far. Which means this is either handled by source code or OS language. And it's a bit much to change OS language to get date formatting in node red
Anything closer to or eual to ISO. Ie. something closer to 2026-03-20T08:17:20+00:00 UTC+XX:00 (but [UTC+1] is also fine) or similar to whatever NR shows for UTC. And much much further away from 3/4/2026, 6:17:20 PM [UTC+1] which is just begging for misinterpretation, false posisitives and positive negatives, introducing new bugs or investigating/fixing stuff which wasn't broken.
Windows clock which I am allowed to set myself I use YYYY-MM-dd HH:mm:ss which I do prefer, but even ISO is huge improvement over whatever browser decides is local.
According to my searches you can set the language in the browser, but I have not tried it.
The source for generating the output appears to be in the file packages/node_modules/@node-red/editor-client/src/js/ui/utils.js in the function formatNumber (search for toLocaleString). If you really want to change this you could fork node-red and edit it yourself and build your own node-red variant. The current code, if I have found the correct place, is
} else if (format === 'dateML') {
var dd = new Date(obj);
element.text(dd.toLocaleString() + " [UTC" + ( dd.getTimezoneOffset()/-60 <=0?"":"+" ) + dd.getTimezoneOffset()/-60 +"]");
}
I must admit that for me it is not be a big issue, I am not sure I have ever looked at the local time version (before this thread). Even when we are in summer time (UTC+1) I tend to think in UTC when looking at times in the debug pane.
As a workaround you can put this in the debug node
If clicking to cycle through the debug output formats till you get to the one you want is too annoying, which I can understand, how about inserting a dayjs node?
By default it will give an ISO date/time string, but you can format the output as you like, including changing timezones.
Hmm, that might benefit from some modernisation. We have the INTL library now which can output locale-specific formats.
I must admit though that I rather agree that, in general, locale dates are rubbish. "YYYY-DD-MM HH:mm:ss [timezone]" would likely be a much better option all round.
Yeah to remember last date format you chose is so awesome! However I'm looking at an array with thousands of datapoints, each with their own timestamp. Not sure if day.js is useful for that?
I suspect that you could use a change node with jsonata to apply day.js formatting to every array element.
I am sure it's possible but I don't know the syntax.