Give a stream of consciousness and then the final answer. Secular historians generally place its composition some time in the late 1st century or first half of the 2nd century AD, with a wide margin of uncertainty. The text seems to be contending against nascent Gnosticism (1 Tim 1: 4, 1 Tim 4: 3) (see Encratism), which would suggest a later date due to Gnosticism developing primarily in the latter 1st century. The term Gnosis ("knowledge") itself occurs in 1 Timothy 6: 20. If the parallels between 1 Timothy and Polycarp's epistle are understood as a literary dependence by the latter on the former, as is generally accepted, this would constitute a terminus ante quem of AD 130 -- 155. However, Irenaeus (writing c.AD 180) is the earliest author to clearly and unequivocally describe the Pastorals.

Answer this question: when was the book of 1 timothy written?
The relevant information is: Secular historians generally place its composition some time in the late 1st century or first half of the 2nd century AD, with a wide margin of uncertainty.
So, the final answer is some time in the late 1st century or first half of the 2nd century AD , with a wide margin of uncertainty.