It takes place in 1200BC, but was written down for the first time 400 years later. The poem itself is anachronistic because it depicts Greek social orders from the time of homer and not the time it actually takes place. And the earliest written fragment still extant comes from 500 years after Homer. Plus it's a fantasy tale. Go and enjoy the movie. It's not a history book.