The mayor of a city of the primary class shall have the power to remit fines and forfeitures and to grant reprieves and pardons for all offenses arising under the ordinances of the city.