Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Help with timeformat #826

Open
PowerZone21 opened this issue Jan 7, 2024 · 3 comments
Open

Help with timeformat #826

PowerZone21 opened this issue Jan 7, 2024 · 3 comments

Comments

@PowerZone21
Copy link

PowerZone21 commented Jan 7, 2024

Hello,

I have a flow that sets acrual date and time, but I can't figure out how to change timezone to UTC+1, I want to add one hour to the timeformat

Copy of the flow here:

[{"id":"b2132320a51ffb3a","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"786b066b780fa8b8","type":"inject","z":"b2132320a51ffb3a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":190,"y":180,"wires":[["b4f77de11a5c49da"]]},{"id":"72dbedd9548ccce0","type":"ui_text","z":"b2132320a51ffb3a","group":"3ba37fd4.6558f","order":0,"width":0,"height":0,"name":"","label":"Date: ","format":"{{msg.payload}}","layout":"row-spread","x":510,"y":220,"wires":[]},{"id":"b4f77de11a5c49da","type":"function","z":"b2132320a51ffb3a","name":"Format Time","func":"var d = new Date();\nvar options = { timeZone: 'UTC', year: 'numeric', month: '2-digit', day: '2-digit', hour: 2-digit, minute: 2-digit, second: 2-digit};\nvar _resultDate = d.toLocaleDateString('no-NO', options);\nmsg.payload = _resultDate;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":220,"wires":[["72dbedd9548ccce0"]]},{"id":"3ba37fd4.6558f","type":"ui_group","name":"Example Flow","tab":"72415252.b2cadc","order":1,"disp":true,"width":"8","collapse":false},{"id":"72415252.b2cadc","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

@PowerZone21
Copy link
Author

If possible, timezone for norway, witch have summer and wintertime

@dceejay
Copy link
Member

dceejay commented Jan 7, 2024

We prefer general how-to type questions in the discussion forum where many more folk hang out and can help - and to keep the issues list for actual bugs and enhancements.

@PowerZone21
Copy link
Author

Thanks for feedback.
I have edited my question

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants