Employee roaming during working hours

I left my workplace to visit a friend during working hours without seeking permission of my supervisor as the company policy prescribes. When I went back to the workplace the supervisor asked me to explain where I was for two hours. I told him the truth but instead of taking disciplinary action, he reported me to the police who came to arrest me and subsequently charged me with the offence of being idle and disorderly. Can you tell me the legality of this charge? I find it very shocking.
TR, Musoma

The offence of being idle and disorderly is created by section 176 of the Penal Code. An employee who leaves his workplace without any lawful excuse and roams around during working hours when he is supposed to be at his workplace commits the offence of being idle and disorderly and is liable to imprisonment for a period of 3 months. The employer had the discretion to take disciplinary action against you or report you to the police for arrest and criminal prosecution. Much as you do not want to hear this, the charges against you are fair. The law requires employees to work during working hours and not roam around. We must state though that this is a rare occurrence at the workplace.