The film was a foreign film (Eastern European?) produced I think in the 2010s. The film was about a teenage boy who is terrified of heights. On a school trip into the mountains he somehow travels back in time. (There was an eclipse. He gets sucked into a hole that opens in the mountain.)
Eventually, he saves a village (by helping with a flying machine?). Strong fantasy elements that I think are connected to legends/history from the country where the movie was produced. Anyways, after he defeats his fear he goes back into his time and saves his friend who is falling and is in mortal peril.