Dashboard, forms - date wrong

Hi!

When i use the date option in the dashboard form node i get a day behind the set date and the time is set to 23:00.

And would love a time function too :wink:

My code below

[{"id":"57f10757.239c5","type":"ui_form","z":"b497193c.f50cf","name":"","label":"","group":"e33f1d6.348976","order":3,"width":0,"height":0,"options":[{"label":"Event","value":"event","type":"text","required":true,"rows":null},{"label":"Opmerking","value":"remark","type":"text","required":true,"rows":null},{"label":"Aantal team","value":"teams","type":"number","required":true,"rows":null},{"label":"Datum","value":"date","type":"date","required":true,"rows":null}],"formValue":{"event":"","remark":"","teams":"","date":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","x":200,"y":3120,"wires":[["f1a41829.1e3c4"]]},{"id":"f1a41829.1e3c4","type":"debug","z":"b497193c.f50cf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":410,"y":3120,"wires":[]},{"id":"e33f1d6.348976","type":"ui_group","name":"Gebruikers inladen","tab":"47ee6c1.5f4ce14","order":1,"disp":true,"width":"6","collapse":false},{"id":"47ee6c1.5f4ce14","type":"ui_tab","name":"new game 2","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

I'm guessing your current time zone is GMT+1?

The time you are seeing is 00:00 UTC which is technically 23:00 GMT+1.

Read this previous thread for a better understanding.

1 Like

Thanks for the link!

What you are actually getting is the timestamp for the start of the day in your timezone (or that of the node-red server actually). So if you displayed that time as localtime it would show what you expect. Whether you need to convert it into local time depends on what you are trying to do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.