Genes that help plants sense when it is dark have been pinpointed by Edinburgh scientists.
Researchers at the University of Edinburgh said the genes allowed plants to make tiny adjustments to their internal clock as the light changed.
They said this process was crucial in helping plants adapt to different lengths of days and changing seasons.
The scientists hope the discovery could help shed light on other daily rhythms, such as the patterns of human sleep.
The study used computer models of gene networks in a cress plant to show that certain genes take effect to enable plants to reduce their activity at night and predict when the sun will rise again.
Scientists already knew that plant activity, such as growth and flowering, was controlled by an internal rhythm, known as a circadian clock.
Previous studies have shown that even the simplest of plants have a complicated internal clock, with daylight saving time built in.
Professor Andrew Millar, of Edinburgh University's school of biological sciences, who led the study, said: "By understanding the various ways in which a simple plant adapts its inner clock to the changing lengths of days in different seasons, we may be able to understand more about why some plants grow better in certain regions of the world and find new varieties to grow in other locations.
"It may also help to understand how native species will cope with climate change.
"Our systems biology approach combines experiments with the use of supercomputers for mathematical modelling.
"The lessons we learn from our models will also apply to the clocks that control many human rhythms, such as sleep cycles and blood pressure."
The study, a collaboration with researchers from Nagoya University in Japan, was funded by the Biotechnology and Biological Sciences Research Council and published in the journal Molecular Systems Biology.