Although the identification of Dhul Qarnayn is not clear in religious texts, he is the one who was mentioned in Quran - Islamic Holy Book in the verse "Kehf 18/83". In this verse it written that he visited the West and East of the world. In the West he founded the sun set on a muddy sea. According to the theologists the mentioned sea is Atlantic Ocean. And than again in Quran it is mentioned that he met with Moses and together they have travelled. At the beginning of the travel Dhul-Qarnayn warned Moses not to criticize the actions he will do during this travel and Moses promised. However, when Moses witnessed that he killed a child and sinked a ship, he could not prevent asking him the reasons of these.
And Dhul Qarnanyn replied him that he sink the ship becasue it was followed by a King who was trying to grab the ship I decided to prevent this. Secondly, I have killed the child because when he grew up he could be a bad person who can do bad things to his family. Thirdly I have built the wall in the town becasue under it there was a treasure which was belong to to little boys. I protected the treasure by building the wall. When these boys grew up they can find it and become reach otherwise other people could find the treasure.
As it was mentioned above Dhul Qarnayn is a person who is able to change the historical stream of the events. Somehow he has information from future and he is trying to prevent some bad things while goiing into the past, to the origin of the events in the future.
Click here to learn more on time travel