Different people can stand the hot weather differently, so it is quite individual. Personally, if I am not under the sun, I don't really care if it is hot, or not - I just train as I like to. The dehydration can be taken care of by drinking a bit more water. However, if we are talking about training outside, it is best to either train early in the morning, or later at noon. During the day time the UV index will be really high.