This sample is of a module that calculates the Solar terminator (shadow of where the sun don't shine) as well as the suns approximate overhead location on the map.
Year:
Month:
Day:
Hour:
https://github.com/Microsoft/BingMapsV8CodeSamples/tree/master/Samples/Other/Solar%20Terminator