How plants know whether it is day or night