# Time range switch incorrect date

**URL:** <https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118>\
**Category:** General\
**Created:** [4 September 2019 17:50 UTC](https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118 "2019-09-04T17:50:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Poodlepapa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/poodlepapa/32/8174_2.png) [@Poodlepapa](https://discourse.nodered.org/u/Poodlepapa)\
**Post date:** [4 September 2019 17:50 UTC](https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118/1 "2019-09-04T17:50:44Z")

</div>

I have a flow that is using a time range switch, it almost works but not quite. I think the problem is with the date, it says "invalid date" under the node. I've installed all 3 the dependancies and checked the date and time on the pi (its correct).  
The issue is that it will not transmit the flow during the times specified, the flow just stops at that node and nothing gets through when the "time window" should be open. The second output works fine, just passing the signal along like its supposed to.  
Could the invalid date be causing this?  
How do I fix that?  
thank you

 ![05%20AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cbc7e20924983d4934853b5073317e1dfba6682c.png)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 September 2019 17:58 UTC](https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118/2 "2019-09-04T17:58:48Z")

</div>

That’s a contrib node that you have installed.  
If you want help from the forum it’s better to include the full name so that users might recognise it.

Alternatively if you think you have found a bug in the node, please open an issue on the nodes github page so that the author of the node hears about it.

---

<div class="post-metadata">

**Author:** ![Poodlepapa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/poodlepapa/32/8174_2.png) [@Poodlepapa](https://discourse.nodered.org/u/Poodlepapa)\
**Post date:** [4 September 2019 18:27 UTC](https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118/3 "2019-09-04T18:27:50Z")

</div>

Will do thank you.  
I thought that is was called “time range switch”. Here is a link to the page.

> **[node-red-contrib-time-range-switch](https://flows.nodered.org/node/node-red-contrib-time-range-switch)**
>
> A simple Node-RED node that routes messages depending on the time. If the current time falls within the range specified in the node configuration, the message is routed to output 1. Otherwise the message is routed to output 2.

I’ll post a question there

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [4 September 2019 18:38 UTC](https://discourse.nodered.org/t/time-range-switch-incorrect-date/15118/4 "2019-09-04T18:38:09Z")

</div>

the name is node-red-contrib-time-range-switch

otherwise it could be a generic question about time range switches
