5U.K.A detained person shall be deemed to be in legal custody throughout the period of his detention.