A 31-year-old man verbally abusing people at Wilton shopping centre in Cork was later found to be carrying a knife in his jeep.
John Dzierba, previously of Presentation Place, Greenmount, Cork, claimed he had the knife for fishing.
However, gardaí did not accept that Dzierba had been fishing that day.
Judge Olann Kelleher sentenced him to five months in prison yesterday at Cork District Court.
Inspector Daniel Coholan said the accused man had numerous previous convictions including counts for burglary, theft, robbery and criminal damage.
The judge was also told that the accused man was serving a long sentence for an unrelated crime and was due for release in 2022.
The five months imposed on him yesterday will run concurrently with that.
Eddie Burke, defence solicitor, said the accused was pleading guilty at the first opportunity.
Inspector Coholan said the incident occurred at the carpark of Wilton shopping centre on April 14 2017.
“Gardaí responded to a call about a man parked in a jeep who was being abusive to members of the public and he had a number of juveniles in his company.
“The driver of the jeep was John Dzierba. A search was carried out and a small knife was recovered in the pocket of the driver’s door.
“John Dzierba was arrested for the offence of carrying a firearm.
“When he was questioned about the knife he agreed it was in his possession and used it for fishing. He was not fishing on the date in question and should not have had it in his car,” Inspector Coholan said.