Cal. Gov't Code § 36904
The legislative body may require persons imprisoned for violation of an ordinance to labor on public property or works within the city.