CrPC Section 119
Commencement of period for which security is required
1. If any person, in respect of whom an order requiring security is made under section 106 or section 117, is, at the time such order is made, sentenced to, or undergoing a sentence of, imprisonment, the period for which such security is required shall commence on the expiration of such sentence.
2. In other cases such period shall commence on the date of such order unless the Magistrate, for sufficient reason, fixes a later date.