Time Range Node Feature Request

Feature request:

If using a start time at 23:00, and an end time at 06:00, the behaviour could carry overnight.
In situations where End Time < Start Time

Currently, it would be true at 23:00, and then false at 00:00

Hey @ChrisGM,

One way to do this instead of thinking about time overnight would be to say that you want the time between 00:00 to 06:00 and 23:00 to 00:00 hours per day. Another way to to say that would be any time not between 06:00 and 23:00 hours. Could you use the Time Range Node and set the days and the hours to be Start Time 06:00 and End Time 23:00 and then if that takes the false path then continue your workflow? Basically instead of always looking for the truth path, go off the false path. You could also handle this case by using multiple Time Range Nodes.

Would this work for your use case?

Thanks,
Erin

I like @Erin_Thompson’s proposed workaround of flipping the logic, where the Time Range Node checks for times between 06:00 and 23:00 instead, and the false path then becomes what would have been the true path for your desired behavior.

That said, I would expect what you are trying to do - checking for an overnight value from 23:00 to 06:00 - to work, especially since we are allowing you to provide that value in the node configuration. I’ve filed a bug ticket with our team and have asked them to prioritize it for our next release - though I can’t say for sure we can put a fix in place as it may lead to breaking changes in the node’s behavior for existing users. At the very least we will disallow entering such time range values in the future to avoid the confusion.

Thanks for bringing this to our attention.

1 Like

Thanks @Erin_Thompson & @Dylan_Schuster,

I like the suggestion of flipping the times and using the false path, and can confirm this works well!

Hi @ChrisGM, just wanted to let you know this has been fixed - the Time Range Node should now work as expected when handed “overnight” start and end times (a start time of 23:59 or earlier and an end time between 00:00 and the start time).

To use the example from your original post, given a Start Time of 23:00 and an End Time of 06:00, the time 00:00 will now resolve as true.

Thanks again for the feedback!

1 Like

Thanks @Sebastian_Turner

I have another question on the timings. (Maybe another ticket)
Inside the edge controller, daylight savings doesn’t seem to be factored in. My timings are now 1 hour out.
Have you come across this before?