What is the time period separating the Trojan War from the appearance of Homer’s poems?

What is the time period separating the Trojan War from the appearance of Homer’s poems? What anachronisms in the Iliad and Odyssey texts indicate their later origin?

The most striking anachronism in Homer is Menelaus, the king of Sparta, which arose only in the 9th century. BC. At the same time, Thebes was formed – the birthplace of Helen of Troy.
Apparently, Homer composed his poems in the 8th century. BC, when the relatively young Sparta seemed to the Achaeans a contemporary of ancient Athens, Mycenae and Pylos. Four to five centuries after the Trojan War, Homer could not avoid such mistakes.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.