Upon conviction of violation of any of the ordinances, rules or regulations set forth by the governing authority of Rockdale County, the magistrate or judge of said court may punish such offender by imposing a fine not in excess of that prescribed by the ordinance or regulation violated and in no event to exceed the sum of five hundred dollars ($500.00) for any single offense, by imprisonment in the county jail for a period not in excess of that prescribed by the ordinance or regulation violated and in no event to exceed thirty (30) days for any single offense, or by any one (1) or more of these punishments in the discretion of the judge of said magistrate court. The magistrate or judge of said court, at his sole discretion, may require such offender to provide public service to Rockdale County in lieu of imprisonment in the county jail. The sheriff of Rockdale County shall provide supervision for offenders performing such public service. The sheriff of Rockdale County shall receive, confine, feed and care for prisoners sentenced by said magistrate court to imprisonment in the county jail in the same manner as persons charged with an indictable offense under general laws of this state and subject to the same penalties for his refusal to receive and take charge of such persons; except that prisoners received under sentence from said magistrate court may be confined separately and apart from other classes of inmates of said jail as the sheriff may, in his discretion, provide and as general laws may require.