Tex. Code of Criminal Procedure § 2 — TX Code / Code cr / Chapter 42 / Section 2
§ 2.
Status: in_force

Sec. 2. A defendant participating in a program under this article shall be confined in the county jail or in another facility designated by the sheriff at all times except for:

(1) time spent at work and traveling to or from work; and

(2) time spent attending or traveling to or from an education or rehabilitation program approved by the sheriff.(a) The victim of a criminal offense has a restitution lien to secure the amount of restitution to which the victim is entitled under the order of a court in a criminal case.

(b) The state also has a restitution lien to secure the:

(1) amount of fines or costs entered against a defendant in the judgment in a felony criminal case;

(2) amount of reimbursement for costs of:

(A) confinement ordered under Article 42.038; or

(B) notice provided under Article 62.056 or 62.201; and

(3) amount of damages incurred by the state as a result of the commission of an offense under Section 38.04, Penal Code, in which the defendant used a motor vehicle while the defendant was in flight.The battering intervention and prevention program is established in the division.Sec. 2. The sheriff in charge of each county jail may grant commutation of time for good conduct, industry, and obedience. A deduction not to exceed one day for each day of the original sentence actually served may be made for the term or terms of sentences if a charge of misconduct has not been sustained against the defendant.Sec. 2. If a defendant appeals his conviction and is released on bail pending disposition of his appeal, when his conviction is affirmed, the clerk of the trial court, on receipt of the mandate from the appellate court, shall issue a commitment against the defendant. The officer executing the commitment shall endorse thereon the date he takes the defendant into custody and the defendant's sentence begins to run from the date endorsed on the commitment. The Texas Department of Criminal Justice shall admit the defendant named in the commitment on the basis of the commitment.Sec. 2. (a) In all criminal cases the judge of the court in which the defendant is convicted shall give the defendant credit on the defendant's sentence for the time that the defendant has spent:

(1) in jail for the case, including confinement served as described by Article 46B.009 and excluding confinement served as a condition of community supervision, from the time of his arrest and confinement until his sentence by the trial court;

(2) in a substance abuse treatment facility operated by the Texas Department of Criminal Justice under Section 493.009, Government Code, or another court-ordered residential program or facility as a condition of deferred adjudication community supervision granted in the case if the defendant successfully completes the treatment program at that facility; or

(3) confined in a mental health facility or residential care facility as described by Article 46B.009.

(b) In all revocations of a suspension of the imposition of a sentence the judge shall enter the restitution due and owing on the date of the revocation.Sec. 2. The judge may order the prosecuting attorney, or the attorney or attorneys representing any defendant, or the court clerk under the supervision of an attorney, to prepare the judgment, or the court may prepare the same.