Getting The Time

I’m having a problem with reactor getting the time wrong when referencing a specific time range or sunset to sunrise. Any advice?

Do you have “Test Time” turned on at the Tools tab?

Well, I did… Thanks.

Honestly, that setting causing more problems than it helps. I’m over it. It’s coming out of 3.6!


Please don’t @rigpapa, it comes in handy. Maybe splash a warning that test time is active in red, or something similar.

1 Like

Hi @rigpapa,

I vote keep, but in your face if on as well. I made the same error, but could not test without it.

Cheers Rene

Wow, I had no idea there was such love for that feature out there. OK. Just know that when you use it, it’s going to cause time travel consequences, and your RS could behave very oddly unless/until you restart it after clearing the Test Time. I have thus-far resisted making that restart mandatory/automatic, as sensor restarts are destructive to stored state data (it’s a reboot of the RS; config is preserved, but it starts like it’s seeing the config for the first time).


Maybe an identifying color code in the status view representing test mode on.

Yup, did that.

The other thing I did… one of the big problems “Test Time” has is that it’s “frozen” in time. If you are testing conditions that include delay or sustain options, for example, there was no way for those to resolve, because time never changed. So now, when you set the “Test Time”, you truly are warping forward or backward in time, and starting a clock in an alternate testing universe that runs forward from that moment. That is, if you the Test Time to yesterday 10am and wait 15 seconds, the time is yesterday 10:00:15am. And that clock will continue to run like that, even across reboots. That lets all the timing options work properly, so they can be tested even when Test Time is set.

What I can’t do right now is make that work for the time() function in Expressions. That function will always return the current correct time, at least for the moment, because the underlying subsystem that parses and executes those expressions doesn’t allow me to override the time function. That’s too big a project to undertake when I’m already far too late getting this updated Reactor release out the door. I’m just going to have to leave that bit unfinished for now, to be dealt with in a future revision.


Nice Patrick. Again spot on.

Cheers Rene

1 Like

Ah,… test time is frozen. That’s way testing with a delay for a opened door won’t do anything.

Please keep it and use extra warning. Sometimes very handy,