(2) The defendant may be arrested and detained in any county in the state by any peace officer and held for the authorities from the county to which the execution is directed. Time spent by the defendant in such detention shall be credited toward the term specified in the judgment. [Amended by 1961 c.358 §1; 1967 c.372 §4; 1985 c.540 §37]