The Solar Zenith Angle is the most important. This is what changes from winter to summer and morning to night.
Vitamin D production is only made on the UVB range that is highest at midday. Both UVA and UVB causes erythema. Counterintuitively to common sense, it is better to sun bath midday than early in the morning.
If you sunbath at 8 you might need twice as many time to produce the same amount of vitamin D and you be exposed to much more UVA, thus more like to get burn.
There are other related calculators linked also.