Perhaps both can be true. Added lines have a double-pound sign ##.
2347-2366: Federation-Cardassian War
-- 2347: Cardassian commandos attack Federation colony on Setlik-III, claiming it was a military outpost.
-- 2347: # Star Fleet sends a squadron of ships to repel Cardassians from Setlik-III
-- 2347-2348: # Setlik-III colony evacuated and abandoned. Cardassian take control soon after
-- 2348: # Cardassians attempt to take several more planet; Star Fleet sends a reinforced Task Force
-- 2348-2352: # Open warfare between Federation and Cardassia. Federation is unwilling to fully commit to the task and thus never push into Cardassian space, only preventing Cardassian advances. There are at least six major battles and several smaller skirmishes during these years.
-- 2352: # Uprising on Cardassia Prime; government forces put the coup down
-- 2352-2358: # Dealing with unrest at home and on annexed worlds, the War dies down to occasional border skirmishes.
-- 2356: ## Star Fleet retake Setlik-III and establish a military outpost on the former colony grounds.
-- 2358-2360: # Cardassian forces make a concerted effort to push the Federation border back and annex many high-value planets. They have limited success.
-- 2360-2366: # Nearing economic collapse, Cardassian Union is unable to continue full-scale war and look to bargain for a diplomatic solution
-- 2362: ## Federation diplomats declare Cardassia is unable to continue the war; Star Fleet reopens Setlik-III to Star Fleet family members and civilian contractors; Cardassian commandos attack, committing war crimes in failed attempt to retake the planet.
-- 2363-2364: ## Brief reprisal in the war as Star Fleet attempts to push Cardassian forces off disputed planets, retaking about 2/3s of them. Federation diplomats order Star Fleet to stop and to not push into Cardassian space, believing this sign of good will should bring Cardassia back to the negotiation table.
-- 2363: Brief reprisal in the war after Cardassian attempt to capture an important Federation outpost
-- 2367: After three years of negotiations, Federation-Cardassian Armistice signed
-- 2369: Star Fleet Intelligence believes Cardassia plans to invade Minos Korva
-- 2370: Federation-Cardassian Treaty finalized. New border is drawn as a sweeping S-curve that conceded to Cardassia many of the same planets they attempt to take by force during the war. The border also officially removes Bajor from Cardassian space.
Regardless, I'm staying with the version that O'Brien was in the ground action in 2347.
Absolutely no mention of Setlik III or the Cardassian war. Just a random line about how long he's been beaming people.
There's that, and the fact that he became a transporter tech / engineer after, in the thick of battle with Cardassian forces, he figured out how to fix the transporter to save his squad.
Also, let's take Benjamin Maxwell's actions into account. If Setlik III happened in 2347, why would it have taken twenty years for him to randomly go nuts and start attacking Cardassian ships because he's not over his trauma about his wife and children dying? Wouldn't only five years (2362-2367) make more sense in this scenario?
PTSD is a funny thing. One can be triggered decades after living a perfectly normal life. He saw events unfolding just as they did in '47, and he said he could not allow it to happen again. PTSD triggered.