Any skin directly exposed to sunlight may synthesise vitamin D. The number of minutes varies by the time of year, skin colour, age, and where you are. For a fair-skinned person, it’s estimated that ~ 25 minutes of sunlight on face and forearms around the middle of the day 2-3 times a week would be sufficient, in the summer months in the UK. In tropical latitudes it would be less time. For dark-skinned ( and elderly ) it would be longer.
However, dermatologists tend not to recommend deliberate sun exposure as a " safe " means of getting vitamin D.
The "D"ilemma pitches vitamin D against " safe skin ". At the very least, burning ( redness, or worse ) should be avoided. Sunburn may cause DNA damage in skin cells ( with risk of change to cancer ).
It’s not only malignant melanoma which may result from excessive sun ( and sunbed ) exposure. Other skin cancers are also increased in frequency ( " squamous carcinoma " and " basal cell carcinoma / rodent ulcer " ). Although melanoma is the most serious ( while most can be successfully treated ), these other cancers are more common.
There is a further caution - taking vitamin D in higher than recommended doses can raise calcium levels in the blood - with various effects, such as passing much urine, nausea, vomiting and headaches.
More information is available on links 1,2, and 3 in my previous post #12. There’s now concern about rickets and osteomalacia in immigrants and ethnic risk groups, especially children ( see link ).