Lol I ended up just "cheating". Since I previously had issues with time periods that ran past midnight, I just created the "Daytime" flag. A dummy module trips macros that set the bit at 6 am and clear it at 9 pm. Then just use the flag as a condition. The cool thing about this approach is I can trip the dummy moduke and instantly the system thinks its night, so I can test more easily.
I used a "Daytime" flag too, but set and cleared by timers¯os activated by dawn and dusk. That way you get true dawn and dusk times regardless of the season.
Note that I am running AHP 3.308 (UK/Europe version) so some details may differ from US version.
The Euorpean version is developed by a separate group.
If you are in the US, you might want to try the latest US version, and see how it works for you.
As for the "daytime" flag, that is the workaround that most of the users who had the problem ended up using to get around this issue. It is useful to be able to trigger it to test the conditions, but you are still using up one of your flags, as well as a module address for the macros to turn the flag on and off.
You don't need a dummy module, though. You can set timers on macros, so they trigger at specified times.
Conditions crossing midnight sometimes had to be done as an if-then-else macro, with the first condition covering the time before midnight, and the second one covering the time after midnight. That may have been corrected in later versions, though.