I read this book in the 2010s and I don’t remember much about it. All I remember is that there was a guy named Troy who had experience in the military. He was then asked to go on a mission to this lightbulb factory where he was told they created a sort of a time machine that can only send you back to the past, and only in the times of Wild West. He was supposed to go there because some guy wanted to leave with some gold.
I think this is 'A rebel in time' by Harry Harrison. The protagonist is called Troy; a black army officer. He is tracking down a Colonel McCulloch who wants to change the outcome of the American civil war, and who buys a large quantity of gold as a means of taking money back to the past.