The delay doesn't delay the closing or opening of the door.
Think about what happens in the evening. As it gets darker, the ADC voltage increases (assuming the LDR is at the bottom of the voltage divider, as I suggested). So the value you read from the ADC represents "darkness", if you like...