See this Comm Center post by Mark Williams. The test for open-before time contains an implicit integer conversion, resulting in the ability to open only 0, 1, 2, 3 etc. hours before sunset.