CAL. PEN. CODE § 4019 : California Code - Section 4019

(a) The provisions of this section shall apply in all of the following cases:

(1) When a prisoner is confined in or committed to a county jail, industrial farm, or road camp, or any city jail, industrial farm, or road camp, including all days of custody from the date of arrest to the date on which the serving of the sentence commences, under a judgment of imprisonment, or a fine and imprisonment until the fine is paid in a criminal action or proceeding.

(2) When a prisoner is confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp as a condition of probation after suspension of imposition of a sentence or suspension of execution of sentence, in a criminal action or proceeding.

(3) When a prisoner is confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp for a definite period of time for contempt pursuant to a proceeding, other than a criminal action or proceeding.

(4) When a prisoner is confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp following arrest and prior to the imposition of sentence for a felony conviction.

(5) When a prisoner is confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp as part of custodial sanction imposed following a violation of postrelease community supervision or parole.

(6) When a prisoner is confined in a county jail, industrial farm, or road camp, or a city jail, industrial farm, or road camp as a result of a sentence imposed pursuant to subdivision (h) of Section 1170.

(b) Subject to the provisions of subdivision (d), for each four-day period in which a prisoner is confined in or committed to a facility as specified in this section, one day shall be deducted from his or her period of confinement unless it appears by the record that the prisoner has refused to satisfactorily perform labor as assigned by the sheriff, chief of police, or superintendent of an industrial farm or road camp.

(c) For each four-day period in which a prisoner is confined in or committed to a facility as specified in this section, one day shall be deducted from his or her period of confinement unless it appears by the record that the prisoner has not satisfactorily complied with the reasonable rules and regulations established by the sheriff, chief of police, or superintendent of an industrial farm or road camp.

(d) Nothing in this section shall be construed to require the sheriff, chief of police, or superintendent of an industrial farm or road camp to assign labor to a prisoner if it appears from the record that the prisoner has refused to satisfactorily perform labor as assigned or that the prisoner has not satisfactorily complied with the reasonable rules and regulations of the sheriff, chief of police, or superintendent of any industrial farm or road camp.

(e) No deduction may be made under this section unless the person is committed for a period of four days or longer.

(f) It is the intent of the Legislature that if all days are earned under this section, a term of four days will be deemed to have been served for every two days spent in actual custody.

(g) The changes in this section as enacted by the act that added this subdivision shall apply to prisoners who are confined to a county jail, city jail, industrial farm, or road camp for a crime committed on or after the effective date of that act.

(h) The changes to this section enacted by the act that added this subdivision shall apply prospectively and shall apply to prisoners who are confined to a county jail, city jail, industrial farm, or road camp for a crime committed on or after October 1, 2011. Any days earned by a prisoner prior to October 1, 2011, shall be calculated at the rate required by the prior law.

(i) This section shall not apply, and no credits may be earned, for periods of flash incarceration imposed pursuant to Section 3000.08 or 3454. 4019.2. (a) Notwithstanding any other law, any inmate sentenced to county jail assigned to a conservation camp by a sheriff and who is eligible to earn one day of credit for every one day of incarceration pursuant to Section 4019 shall instead earn two days of credit for every one day of service.

(b) Notwithstanding any other law, any inmate who has completed training for assignment to a conservation camp or to a state or county facility as an inmate firefighter or who is assigned to a county or state correctional institution as an inmate firefighter and who is eligible to earn one day of credit for every one day of incarceration pursuant to Section 4019 shall instead earn two days of credit for every one day served in that assignment or after completing that training.

(c) In addition to credits granted pursuant to subdivision (a) or (b), inmates who have successfully completed training for firefighter assignments shall receive a credit reduction from his or her term of confinement.

(d) The credits authorized in subdivisions (b) and (c) shall only apply to inmates who are eligible after October 1, 2011.