I am wonder if casting darkness on an object or creature that has either light sensitivity, such as an Orc, or a complete aversion to sunlight, like a vampire, would protect them from the ill effects of natural sunlight.
From PFSRD (emphasis mine):
This darkness causes the illumination level in the area to drop one step, from bright light to normal light, from normal light to dim light, or from dim light to darkness. This spell has no effect in an area that is already dark. Creatures with light vulnerability or sensitivity take no penalties in normal light.
Please note that if you're using stronger version of the spell, deeper darkness, even darkvision won't allow to see anything within area of effect.