I am not sure what are you trying to achieve
The two conditions you put in there need to be fulfilled at once to produce final true (1), yet there is no time, when hours are both, higher than 22 and smaller than 5.
if there is * between two conditions it means one AND the other must be true simultaneously
if you wanted the logic to be one OR the other OR both put there + like
((one)+(other))>0?..