That vitamin D is good for you.
http://ods.od.nih.gov/factsheets/vitamind.aspSunscreens with a sun protection factor of 8 or more appear to block vitamin D-producing UV rays, although in practice people generally do not apply sufficient amounts, cover all sun-exposed skin, or reapply sunscreen regularly <31>. Skin likely synthesizes some vitamin D even when it is protected by sunscreen as typically applied.
The factors that affect UV radiation exposure and research to date on the amount of sun exposure needed to maintain adequate vitamin D levels make it difficult to provide general guidelines. It has been suggested by some vitamin D researchers, for example, that approximately 5-30 minutes of sun exposure between 10 AM and 3 PM at least twice a week to the face, arms, legs, or back without sunscreen usually lead to sufficient vitamin D synthesis and that the moderate use of commercial tanning beds that emit 2-6% UVB radiation is also effective <11,28>. Individuals with limited sun exposure need to include good sources of vitamin D in their diet or take a supplement.