1[(121A). Period of custody undergone by a person to be set off against theimprisonment.
When any person subject to this Act is sentenced by a Security Force Court to a term of imprisonment, not being an imprisonment in default of payment of fine, the period spend by him in civil or Force custody during investigation, inquiry or trial of the same case, and before the date of order of such sentence, shall be set off against the term of imprisonment imposed upon him, and the liability of such person to undergo imprisonment on such order of sentence shall be restricted to the remainder, if any, of the term of imprisonment imposed upon him.]