More states across the U.S. are decriminalizing cannabis and allowing its use for medical or recreational purposes. As of January 1, 2018, marijuana possession and use became legal for adults 21-years and older in the state of California. That does not mean, however, that people cannot still find themselves facing charges for marijuana-related violations.

According to the California Department of Public Health, adults over the legal age are permitted to possess up to one ounce of cannabis or eight grams of marijuana concentrate. If they are found to have more than the allowed amount in their possession, people could be fined up to $500, sentenced to up to six months in county jail or both. These penalties may be enhanced for extenuating circumstances, such as being in possession of more than the allowed amount of marijuana on the grounds of or within schools providing instruction in any grades of kindergarten through 12th grade.

Although adults are permitted to carry and use cannabis, having an open container in vehicles remains strictly prohibited. Drivers and operators, as well as passengers, cannot have open marijuana containers in motor vehicles, boats, aircraft or other transportation vehicles. A violation of this provision of the state’s cannabis use-related statutes is punishable by a maximum fine of $250.

California law also imposes strict regulations on where cannabis and other marijuana-derived products can be used outside of private residences. People are not permitted to smoke or otherwise ingest marijuana in public places, in places where the use of tobacco is prohibited, or within 1,000 feet of a school or youth center when children are present.

According to the California Cannabis Portal, people can get a DUI if they are driving while under the influence of cannabis while in operation of a car, boat or another type of vehicle. Law enforcement may stop motorists and conduct roadside sobriety tests to assess whether they might be under the influence of drugs such as marijuana or alcohol.