fixed logic for times for light on and off