That said, getting out in the sun is a fairly nuanced debate. Most dermatologists will tell you not to, because of the risk of skin cancer, and because of the lack of peer-reviewed research showing that the benefits of skin-based vitamin D production outweigh the potential for skin cancer:
http://www.nytimes.com/2012/04/24/science/sunscreens-and-vit...
Wearing sunscreen will inhibit vitamin D production, so getting some sun while wearing high-SPF sunscreen is not going to help you as much as unprotected exposure (per the dermatologist in the aforementioned article)
So the question becomes: do you believe the "vitamin D hypothesis" that vitamin D deficiency was the driving force behind the evolution of human skin color? The hypothesis is that northern Europeans evolved lower melanin levels in their skin through a combination of high latitudes and a diet deficient in natural sources of vitamin D:
http://anthrogenetics.wordpress.com/2011/06/29/a-support-for...
So the question of whether you should go out in the sun (unprotected) in order to generate vitamin D becomes a question of whether you are more worried about the potential health complications of vitamin D deficiency or skin cancer.
Choose wisely!
Nevertheless, you have more than a couple of hours to get outside and get some sun. Just have a schedule and stick to it :)
One last thing: visit your doctor often and check for overall nutrient levels (vitamins, minerals, etc) and avoid taking supplements before it.
Note that it is exposure to ultraviolet light (particularly UVB) that causes the production of Vitamin D.
http://en.wikipedia.org/wiki/Vitamin_D#Production_in_the_ski...
Just go outside early in the morning or late afternoon, when UV levels are lower. Don't stay toasting on 12:00 PM sun like people going to the beach do. We're talking about 10-30 minutes of sun exposition here.