biddster / node-red-contrib-time-range-switch

A simple Node-RED node that routes messages depending on the time.
18 stars 6 forks source link

Node only respects UTC time zone #28

Closed drewh1991 closed 4 years ago

drewh1991 commented 4 years ago

Using Node Red v1.03. When I create a time range node using either a hard coded time range or sun events the time range switch only functions based off of UTC time. The server has the correct time set as far ask I know. I can click the output from the timestamp node it it will cycle through and show me the epoch time, the current time (in my time zone), UTC and hex.

Here is an example flow, you'll have to change the times to test: [{"id":"9609b3fc.acec7","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"13dad338.30468d","type":"inject","z":"9609b3fc.acec7","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":300,"wires":[["3e1ec76b.c841a8"]]},{"id":"c3260f30.cb726","type":"debug","z":"9609b3fc.acec7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":300,"wires":[]},{"id":"3e1ec76b.c841a8","type":"time-range-switch","z":"9609b3fc.acec7","name":"","lat":"45.027064","lon":"-93.236038","startTime":"13:32","endTime":"13:34","startOffset":0,"endOffset":0,"x":520,"y":260,"wires":[["c3260f30.cb726"],[]]}]

biddster commented 4 years ago

Thanks for the report. What version of node are you using? What version of Schedex are you using?

You're not running node-red in docker are you?

drewh1991 commented 4 years ago

Figured it out! The timezone was not set correctly on my host machine and because of the way my docker container was set up it then did not have the correct time zone. Thanks for responding!