It may be a myth and then again it may not be a myth.
"The Stichting Institute of
Medical marijuana (SIMM), the first company to sell
marijuana through the pharmacies of Holland, has been investigating the medical possibilities of
cannabis, together with TNO laboratories and the University of Leiden. One of their discoveries has been that to keep the ripe plants in the dark before harvesting could increase their potency.
SIMMs growers separated a crop of mature plants, harvested half of them and kept the other half in absolute darkness for 72 hours before cutting and drying. Analysis of the resulting dried buds showed that some varieties had seen an increase of THC of up to 30%, while CBD and CBN remained the same."
It is known that sunlight/grow lights degrade THC, both in growing/flowering plants and also in harvested drying/dried herb.
THC in part works like a sunscreen to protect the THC producing resin heads on the trichome stalks.
During hours of light THC will degrade and then during periods of darkness it will be not only be replenished but overall it will increase.
What happens is something of a roller coaster ride of THC production going up and down and up and down but each up period of darkness increases the overall amounts slightly more until the plant reaches its full genetic potential, assuming of course that all growing conditions are optimal.
 
That is the reason it is considered best to harvest right before first light or as soon as possible after it becomes light or grow lights switch on.
A plants THC level will be the highest right before it receives any sunlight/grow light and slightly decrease throughout the day as the plant receives more and more light from whatever source.