Any person receiving a fine or a sentence to a correctional institution or a community correctional center for an offense committed prior to July 1, 1981, shall receive credit towards any portion of such fine as is not remitted or any portion of such sentence as to which execution is not suspended for any days spent in custody under a mittimus as a result of any court proceeding for the offense or acts for which such fine or sentence is imposed, provided he shall conform to the rules of the institution. Upon notification from the Commissioner of Correction, the clerk of the court shall enter such credit upon the order in the case of a fine, and upon the mittimus in the case of a sentence and it shall be the duty of the agency or person that held such person under such mittimus to inform the clerk of the court of the proper amount of such credit. In the case of a fine each credit day shall be computed at the rate of ten dollars. In no event shall credit be allowed in excess of the fine or sentence actually imposed.