How do plants 'tell time' for circadian rhythms based on a ~24 cycle?
The short answer is that it is because the reaction chains dispensing time and enzymes doing those reactions have evolved to negate the impact of environmental factors. 

The true answer is that the plant clocks do gradually lose sync with 24h cycle when put in stable lighting conditions and move to some more-less random characteristic frequency of their  molecular clock which is quite likely dependent on environment (still it is obviously close to 24h) -- the sad truth is that every clock needs syncing to work properly.