When the offender is to be confined, the sheriff shall, upon order of the court, deliver the offender to the designated place of confinement, provided the place of confinement has an agreement for confinement services with the local community sentencing system or is the county jail. The sheriff shall be reimbursed by the local community sentencing system for transporting offenders pursuant to this subsection. The offender shall be given day-for-day credit for any terms of incarceration served in the county jail or other restrictive facility when the sentence is modified.
Okla. Stat. tit. 22, § 988.20