Too much UV is bad for you. But so is too little UV. You can now estimate the time you should stay in the sun each day to receive adequate UV for vitamin D production, but without receiving so much UV that you get sunburnt. The optimum exposure time depends on the UV Index (UVI). It also depends on your skin type and how much of your skin you expose. At mid-latitude sites like the South Island of New Zealand the times range from less than 1 minute, if wearing swimming suits in summer when the UVI exceeds 10; to more than 3 hours if you’re rugged up in winter when the UVI is less than 1 . See this article for more details, including tips on how to estimate the UVI at any time.