Where an accused person has been convicted and sentenced to imprisonment for a term (other than imprisonment in default of payment of a fine), the period of detention, if any, undergone by the person during the investigation, inquiry, or trial of the same case, and prior to the date of such conviction, shall be set off against the term of imprisonment imposed on the person upon conviction. As a result, the person’s liability to undergo imprisonment will be limited to the remaining period, if any, of the term of imprisonment imposed.
Provided that: In cases referred to in section 433A, the period of detention shall be set off against the period of fourteen years specified in that section.