My physician told me that under no circumstances should I be getting my vitamin D from the sun as skin cancer was not worth it; she instead recommended I get it from my diet.
But generally being outdoors, on a grey winters day in the northern hemisphere, with just your face exposed, and having darker skin, for an hour, is not going to get you enough D.
30 min of sun exposure will give you the equivalent of 10,000 to 20,000 IU.
If you moderate your sun exposure and are responsible, there is no reason you can't use the sun to your advantage.
If you don't you're likely to become vitamin d deficient listening to that person.