andreypopov / node-red-contrib-zigbee2mqtt

Zigbee2mqtt connectivity nodes for node-red
GNU General Public License v3.0
94 stars 24 forks source link

Date format with status under node #120

Closed clmcavaney closed 1 year ago

clmcavaney commented 1 year ago

image I am wondering if the date format shown in this screenshot is created by the zigbee2mqtt node or Node-RED itself.

Is it something that could be configured? It would prefer the ISO format for dates - i.e. YYYY-MM-DD

andreypopov commented 1 year ago

It uses your locale settings

new Date().toLocaleDateString() new Date().toLocaleTimeString()

clmcavaney commented 1 year ago

Cool - thanks - I will look at passing some parameters in my docker-compose.yml I'm thinking something like this:

      environment:
        - LANG=en_AU.UTF-8
        - LANGUAGE=en_AU:en
        - LC_ALL=en_AU.UTF-8
andreypopov commented 1 year ago

It depends on your browser settings! chrome://settings/languages

to check your current locale: Intl.NumberFormat().resolvedOptions().locale

https://developer.chrome.com/docs/extensions/reference/i18n/#how-to-set-browsers-locale

clmcavaney commented 1 year ago

I used the docker-compose.yml environment settings above and it worked.

I had setup language settings within browser and the operating system a long time ago - but that didn't appear to change the view on node-red.

Thanks @andreypopov for the info.

S474N commented 7 months ago

I have the Czech language set in Chrome browser and even then it shows me a strange date and time format (12h - AM/PM). What to choose the date and time display format?

image