Minecraft wiki entry for Traps, associated text: It detects the 'time' of Minecraft day. It can be right clicked to detect sun or moon. Shadow affects this, however, so if you set it to detect sun, and it is in direct sunlight, a redstone signal will be produced, at a power level relating to the height of sun or moon. If it was in shadow, it would not produce any signal, and vice-versa for moon mode. Useful for hourly traps and such, though redstone clocks are more precise but also expensive.