The events take place in Los Angeles. In California, teachers can have consensual sex with adult students and not commit a crime. In 23 states in addition to other laws on the subject, it is a felony-level crime for a teacher such as a coach to have sex with a student. A 2012 Assembly bill tried to align California with these other states, but it failed to pass.
The date on Samantha's cell phone when Bryce sends her repeated texts is Saturday April 16, which corresponds to the year 2016.