(1) If, at the time a person was surrendered to a Tribunal under this Part in connection with a Tribunal offence, the person was serving a sentence of imprisonment in respect of an offence against a law of the Commonwealth or of a Territory, or was otherwise subject to detention under a law of the Commonwealth or of a Territory:
(a) any time spent by the person in custody in connection with the surrender warrant; and
(b) subject to subsection (2), any time spent by the person in custody in connection with detention by, or on the order of, the Tribunal in respect of the Tribunal offence;
is to be counted as time served towards the sentence of imprisonment or period of detention.
(2) If the person is convicted of the Tribunal offence, time spent by the person in custody serving a sentence of imprisonment imposed by the Tribunal for the Tribunal offence is not to be counted as time towards the sentence of imprisonment or period of detention referred to in subsection (1).
(3) A reference in this section to time spent in custody includes a reference to time spent in custody outside Australia.