Plants release insect-repelling chemicals depending on what time it is.

Researchers simulated day and night cycles by varying light in order to study how plants use their internal circadian clocks to defend themselves from bugs, according to a Rice University press release.

The team observed the Arabidopsis thaliana plant begins to release an insect fighting substance a few hours before sunrise, around when the insects are ready for breakfast.

The chemicals are believed to have antioxidant cancer fighting components.

"Vegetables and fruits don't die the moment they are harvested," said Rice University biologist Janet Braam, who led the study. "They respond to their environment for days, and we found we could use light to coax them to make more cancer-fighting antioxidants at certain times of day."

Braam got the idea after a conversation she had with her teenage son.

"I was telling him about the earlier work on Arabidopsis and insect resistance, and he said, 'Well, I know what time of day I'll eat my vegetables!'" Braam said."That was my 'aha!' moment. He was thinking to avoid eating the vegetables when they would be accumulating the anti-insect chemicals, but I knew that some of those chemicals were known to be valuable metabolites for human health, so I decided to try and find out whether vegetables cycle those compounds based on circadian rhythms."

The process is similar to jet lag, people who have flown to different time zones often have trouble adjusting until their circadian clock resets itself.

The team was able to "entrain" different species of vegetables using controlled lighting and a sealed area. They conducted the test on: "spinach, lettuce, zucchini, carrots, sweet potatoes and blueberries."

"We were able to entrain each of them, even the root vegetables," author Danielle Goodspeed said.

She believes storing the vegetables in dark areas could eliminate their daily cycles.

"We cannot yet say whether all-dark or all-light conditions shorten the shelf life of fruits and vegetables," Braam said. "What we have shown is that keeping the internal clock ticking is advantageous with respect to insect resistance and could also yield health benefits."

The team was able to manipulate cabbage to produce more of the compounds during different times of the day.

"It's exciting to think that we may be able to boost the health benefits of our produce simply by changing the way we store it," Goodspeed said.

WATCH: