
36 Cal.3d 403 (1984)
682 P.2d 1087
204 Cal. Rptr. 422
MADERA POLICE OFFICERS ASSOCIATION et al., Plaintiffs and Appellants,
v.
CITY OF MADERA et al., Defendants and Respondents.
Docket No. S.F. 24665.
Supreme Court of California.
July 9, 1984.
*406 COUNSEL
Christopher D. Burdick, Philip M. Miller and Carroll, Burdick, & McDonough for Plaintiffs and Appellants.
Axel E. Christiansen, City Attorney, for Defendants and Respondents.
OPINION
REYNOSO, J.
We granted hearing to determine whether police officers, sergeants and dispatchers are entitled, as a result of the limitations placed on their mealtime periods, to payment for overtime hours worked. That entitlement depends on whether their lunch and dinner hours are considered worktime, inasmuch as the City of Madera mandates overtime pay for those police department employees who work in excess of the normal eight-hour day and forty-hour week. We conclude that the constraints placed on the activities and conduct of the concerned employees during their mealtime are so restrictive that the employees are at work and are thus entitled to overtime compensation.

1. The Trial

This is a class action by the Madera Police Officers Association and three of its members[1] on behalf of all police officers, sergeants and dispatchers *407 employed by the City of Madera after January 1, 1976. Plaintiffs seek payment for overtime wages due and owing, plus interest, an accounting, and declaratory relief.
The employees contend that their mealtime break is so circumscribed as to convert it into hours worked. Under the rules and regulations of the City of Madera, they argue, the work was in excess of the eight-hour day, forty-hour week established as the normal work day and work week for city employees.
Prior to the suit, in September 1979, the employees submitted a grievance to the Madera Civil Service Commission. It was denied unanimously. In December 1979, plaintiffs filed their complaint with the Superior Court for the County of Madera. In addition to arguing that they had a right to overtime under state and local law, plaintiffs sought overtime compensation under the Fair Labor Standards Act (FLSA), 29 United States Code section 201 et seq. Defendants, the City of Madera, the city council, and certain city officials[2] answered, denying overtime liability.[3]
A nonjury trial was held before the Superior Court of Madera County. The record on appeal indicates the following. The officers and dispatchers of the Madera Police Department are scheduled for an eight and one-half hour per day shift[4] which includes a noncompensated meal period, commonly referred to as Code 7 time, during which the employee is permitted to eat a meal. The lead dispatcher is scheduled for a nine-hour shift and is allotted one hour of Code 7 time. The sergeants are scheduled for eight and three-quarter hour shifts including forty-five minutes of noncompensable Code 7 time.
Code 7 time is restricted as follows.[5] The watch commander of a shift decides when the employee may begin Code 7 time. The officers, sergeants and dispatchers do not decide when to take their Code 7 period and they do *408 not have any right to a Code 7 period at a particular time. Thus, they cannot schedule in advance and keep personal appointments during Code 7 time. The employees are on call during Code 7 time and can be interrupted or called away from their meal because of emergencies. They must leave a telephone number or address where they can be reached. If actually called into duty during Code 7 time, they must apply for overtime compensation, although it is unclear from the record if the employees were ever made aware of this possibility. If the employees remain in uniform, they cannot conduct personal business.[6] At trial, Police Chief Skeels explained that this restriction is imposed because of the unique appearance of police officers. He stated that because they are very much in the public eye, "certain things like buying things ... could be interpreted as being intimidative [sic]." The officers must also respond to citizen inquiries and crimes committed in their presence. Finally, because fewer employees are at work during the swing shift (2:45 p.m. to 11:15 p.m.) and the graveyard shift (10:45 p.m. to 7:15 a.m.) the dispatchers working those shifts are not even permitted to leave the building during Code 7 time.
Officer Long testified that as a practical matter, employees cannot remove their uniforms during Code 7 time because they would be unable to adequately respond to an emergency. Officer Kunkel testified as to the difference between merely being on call and Code 7 time. While on a "24-hour-a-day call back," other than realizing that they could be required to work, the officers are under no other restrictions; they are not required to stay by a telephone in order to be available for an immediate call. In contrast, while on Code 7 time, an officer is required to follow the department's code of conduct. If the officer is eating in a restaurant or is in a public place and is interrupted by a question, complaint or request by a citizen, the officer is obligated to be polite and courteous and should take care of the citizen's problem if possible.
Sergeant MacAlpine, a watch commander, testified that if an officer refused to respond to a citizen's request during Code 7 time on the ground that he was off duty, that situation would be investigated as involving potential misconduct and the police captain would be informed of the incident. The sergeant also testified that if an officer was unavailable when an emergency arose because he or she could not be reached at the phone number or address given to the department, a written report for possible disciplinary *409 action would be prepared. Thus, it appears that these duties must be performed during Code 7 time under the threat of potential disciplinary action.
The trial court found that plaintiffs worked eight-hour shifts per day with a one-half hour mealtime break. The court denied plaintiffs' claims, concluding that the restrictions imposed on the officers, sergeants and dispatchers did not entitle them to overtime compensation. It noted that the officers could be compensated when called upon to work extra time. Plaintiffs appeal, alleging that the unquestioned limitations on their Code 7 time are so restrictive as to convert, as a matter of law, the Code 7 time into worktime.

2. The Right to Compensation Under Local Law

(1a) We conclude that the substantial limitations placed on the Code 7 time of the officers, sergeants and dispatchers of the Madera Police Department converted that time into hours worked. In reaching this conclusion we adopt a two-step analysis. We first examine whether the restrictions on off-duty time are primarily directed toward the fulfillment of the employer's requirements and policies. Second, we analyze whether the employees' off-duty time is so substantially restricted that they are unable to engage in private pursuits. Both questions, we conclude, should be answered in the affirmative and under the rules and regulations of the City of Madera, the employees are entitled to overtime compensation.
This analysis finds support in California case law. The precise issue of back pay for overtime worked as a result of restrictions placed on Code 7 time was addressed in Los Angeles Fire & Police Protective League v. City of Los Angeles (1972) 23 Cal. App.3d 67 [99 Cal. Rptr. 908]. The appellate court concluded that, by regulation and administrative practice, the fire and police department officers were subject to substantial controls, limiting their freedom of action during Code 7 time. (2) (See fn. 7.) It upheld the trial court's finding that the officers were working during their mealtime break.[7] The Los Angeles employees were subject to the following constraints during their 45-minute break: "The officers are subject to call by their superiors, they are required to respond to requests by citizens, they are required to respond to emergencies, they may not eat at home or at the home of a friend even with prior approval, the officers may not remove their guns or uniforms (except for hat and coat) when eating in a public place, they must *410 inform `communications' where they are eating so they can be reached, and supervisory approval is required to take a meal out of their area ... [T]hey may take their `Code 7' time only at a time approved by their superiors and not at any regularly scheduled time of day or night. Other restrictions exist." (Id., at p. 73.) The spirit of this decision applies to the case at bench.
The Los Angeles court lay emphasis upon two factors: benefit to the employer and the extent to which the restrictions limited the officers' pursuit of private matters during Code 7 time. (3) We agree that the issue of whether the Madera Police Department employees are entitled to overtime compensation for Code 7 time initially requires a two-step analysis. First, are the restrictions primarily directed toward the fulfillment of the employer's requirements and policies? Second, are the employees substantially restricted during Code 7 time, so as to be unable to attend to private pursuits?
(1b) We turn to the first question. For whose benefit are the restrictions on Code 7 time placed? The requirement that the Madera Police Department employees return to duty if necessary and perform police services during Code 7 time is not beneficial to the employee who is trying to take a meal break; it is imposed primarily for the benefit of the employer. The officers and sergeants cannot conduct personal business while in uniform because, according to the testimony of Chief Skeels, it may intimidate the public. While positive public relations may indirectly benefit the employees, this requirement is beneficial primarily to the employer. Although the employees are permitted to change in and out of uniform during Code 7 time and conduct personal business, their reluctance to do so, arising from a desire to adequately respond to emergencies in the field during their scheduled shifts, is reasonably directed toward the fulfillment of the employer's requirements. The inability to schedule personal appointments in advance, due to the unpredictable nature of Code 7 time, results from the police department's needs. Finally, the requirement that the swing and graveyard shift dispatchers physically remain present in the police building is a requirement imposed solely for the benefit of the employer. We conclude that Code 7 time is so restricted that it primarily benefits the employer, the City of Madera.
Next, we examine the scope of the restrictions and their effect on the employees' ability to pursue private business during off-duty time. Defendants contend that the Madera restrictions are significantly less onerous than the restrictions on the Los Angeles officers. The City of Madera argues that once the officers are cleared to take a mealtime break, the only requirement upon the officer is that he or she advise the department as to the location of the city vehicle.
*411 Defendants' reliance upon this characterization is misplaced. (4) The analysis focuses not on the number of requirements imposed upon the employees, but on the substance and scope of the limitations placed on Code 7 time, whether the constraints result from express requirements, administrative policies, or the limitations that arise from practicality and necessity. (1c) In addition to the express requirements noted by the defendants, consistency with departmental policies and effective execution of all their duties substantially restrict the Madera employees' ability to attend to personal business during Code 7 time. Compared with the restrictions imposed by the Los Angeles Fire and Police Departments, the Madera variations do not significantly enhance the freedom and flexibility of the officers, sergeants and dispatchers during Code 7 time.
Defendants contend that Fowler v. State Personnel Board (1982) 134 Cal. App.3d 964 [185 Cal. Rptr. 292] is controlling. We disagree. That case involved a suit by a California Highway Patrolman for compensation for lunchtime hours. In denying plaintiff's claim, the court noted that, "merely being `on call' does not mean that the officer is working. [Citation omitted.] Nor does wearing a uniform as a condition of employment mean that the officer is on duty." (Id., at p. 970.) (5) While we agree that no one condition is likely to be dispositive of the question of whether the employee was working during lunchtime, we disapprove of the analysis of the Court of Appeal in Fowler. The courts, in evaluating the employee's claims, must examine the restrictions cumulatively to assess their overall effect on the worker's noncompensatory time. To the extent that the Fowler court evaluated each individual restriction independently without consideration of the net impact of all the restrictions on the patrolman's Code 7 time, we disapprove of that analysis.
For the same reason, we reject defendants' contention that the opinion of the Attorney General 39 Ops.Cal.Atty.Gen. 261 (1962), analyzing the single restriction of on-call status, is controlling. That opinion is entitled to great weight (see Cristmat, Inc. v. County of Los Angeles (1971) 15 Cal. App.3d 590, 595 [93 Cal. Rptr. 325]) but it is not dispositive because it only assesses the effect of one factor: on-call status. The case at bench involves restrictions in addition to the on-call status. Indeed, that opinion of the Attorney General implicitly recognizes that on-call status, coupled with other factors, could entitle an employee to compensation. It argues: "While standing by, subject to being directed to return to work, as a general proposition, the employee is not entitled to credit for work performed." (39 Ops.Cal.Atty.Gen. 261, 264 (1962).) However, when the employee is on call during his or her regularly scheduled shift, compensation may be required because, "[a] different situation is presented where an employee has reported for work and is ready and willing to perform his duties but, due *412 to some mechanical failure of equipment, the absence of a working partner, or some other circumstance over which he has no control, he is prevented from working. Here he is `on the job' during his regularly assigned duty hours. If he is requested by his superior, either expressly or tacitly, to remain at the place he usually performs his duties available to commence or resume work while awaiting developments, he is to be credited with time worked during the stand by period." (Id., at p. 265.)
(1d) Similarly, a situation different from merely being on call is presented in the case at bench. At times, the Madera police officers are placed on "24-hour-a-day call back." They are not, however, requesting overtime payment for this period during which they are merely on-call. While on 24-hour call back, there are no restrictions on the officers, other than the duty to report to work, if they are reached; the officers do not even have to be available for immediate recall at a phone number given to the department. In contrast, while on Code 7 time, the officers must always be available for on-call duty during their regular shifts. They must respond to citizens' requests and inquiries, cannot engage in personal business, and must inform the department as to their location. As noted above, other restrictions exist.
Finally, the defendants argue that overtime for all Code 7 time is not required because compensation is available when the officer, sergeant or dispatcher is actually called into duty. The fact that defendants concede that Code 7 time is compensable in part, does not compel us to reach a conclusion other than that Code 7 time is worktime. As in Los Angeles Fire & Police Protective League v. City of Los Angeles, supra, 23 Cal. App.3d 67, the ability of the police officers, sergeants and dispatchers of the City of Madera to conduct personal affairs is substantially restricted as a result of the employer's regulations, policies and work requirements. The fact that even the employer realizes the extent of the restriction does not enhance the employees' freedom during Code 7 time.
(6a) We look to the local compensation regulations to determine if overtime pay is authorized. (7) In the absence of preemptive legislation, employees of a city are entitled only to such compensation as the city charter, and the ordinances enacted pursuant thereto, provide. (Los Angeles Fire & Police Protective League v. City of Los Angeles, supra, 23 Cal. App.3d 67, 77; Bishop v. City of San Jose (1969) 1 Cal.3d 56, 63 [81 Cal. Rptr. 465, 460 P.2d 137].) The right to overtime compensation is set by the law applicable at the time the services are rendered, the California Constitution forbidding a retroactive grant of payment for work already performed for a local government. (See Longshore v. County of Ventura (1979) 25 Cal.3d 14, 23 [157 Cal. Rptr. 706, 598 P.2d 866]; Cal. Const., art. IV, § 17.)
*413 In Fowler v. State Personnel Board (1982) 134 Cal. App.3d 964, 971 [185 Cal. Rptr. 292], overtime compensation was held precluded by California Highway Patrol Manual, section 23.1 which forbade compensation for "time granted for lunch." Similarly, in Los Angeles Fire & Police Protective League v. City of Los Angeles, supra, 23 Cal. App.3d 67, 77 [99 Cal. Rptr. 908], plaintiffs' request for back wages was denied because the city's ordinances provided for overtime in limited situations. The Code 7 time of the Los Angeles officers did not fall into a category of overtime that was compensable (id., at pp. 77-78).
(6b) Accordingly, we must look to the ordinances and regulations of the City of Madera to determine if plaintiffs are entitled to payment. Section 30, Rule 1B of the Personnel Rules of the City of Madera (Rules) provides that "[o]vertime shall be defined as work performed in excess of a normal working day." Section 26 of the Rules states: "Normal work day shall mean the number of hours worked in a twenty-four (24) hour period beginning at twelve o'clock midnight on any working day. Normal working day for the Fire Department shall begin at eight o'clock a.m. or such other hours as may be approved by the Fire Chief and City Administrator."
Personnel Rule XI(1)(b) provides that "[t]he Police Department shall operate on a 24-hour basis. Employees of this department shall work ... shifts of 8 hours each, with 40 hours as the established work week."[8] Rule XIX(2) states that "an employee earning overtime may elect to receive compensating time off or pay in lieu of compensating time off."
Thus, the regulations of the City of Madera mandated overtime for the police department employees for work performed in excess of the normal eight-hour day and forty-hour week. Unlike the provisions in Fowler (134 Cal. App.3d 964) and the city ordinances in Los Angeles (23 Cal. App.3d 67), the regulations of Madera do not provide for exceptions or limitations to compensation for overtime.
(8) This court has stated, "to the extent services are rendered under statutes or ordinances then providing mandatory compensation for authorized overtime, the right to compensation vests upon performance of the overtime work, ripens into a contractual obligation of the employer and cannot thereafter be destroyed or withdrawn without impairing the employee's contractual right." (Longshore v. County of Ventura, supra, 25 Cal.3d 14, 23 [157 Cal. Rptr. 706, 598 P.2d 866].) (6c) The Code 7 time of the *414 sergeants, officers and dispatchers was work in excess of the eight-hour day, and the employees' right to overtime compensation, mandated by the city regulations, vested upon performance.
Plaintiffs also argue that they are entitled to compensation for their Code 7 time under the federal cases interpreting the FLSA (29 U.S.C. §§ 201-219). In view of the fact that we have concluded that plaintiffs had a vested right to overtime compensation under state and local law, it is unnecessary to decide this issue.
The judgment is reversed and the cause remanded for proceedings consistent with this opinion.
Bird, C.J., Mosk, J., Kaus, J., Broussard, J., and Grodin, J., concurred.
KAUS, J.
I concur fully in the result, but respectfully submit that the court's analysis is needlessly complicated. Given a reasonably sane employer, the two-step analysis is 50 percent illusory: is it conceivable that employer-imposed restrictions on conduct during Code 7 time are not "primarily directed toward the fulfillment of the employer's requirements and policies?"[1] Discussions about the identity of the beneficiary of these restrictions obscure the only real question which, in this case, is quite simple: did the limitations placed by the city on Code 7 time so restrict the officers' ability to engage in private pursuits that the time was, in effect, on-duty time with permission to eat a meal  hardly more than a coffee break? Clearly, that question must be answered in the affirmative.
Ertola, J.,[*] concurred.
NOTES
[1]  Plaintiffs James Long and John Kunkel are police officers of the Madera Police Department. Plaintiff Thelma Marvin is a dispatcher with the department.
[2]  Robert Keeley, city manager, and Gordon Skeels, chief of police, were also named as defendants.
[3]  In addition, defendants argued that plaintiffs failed to exhaust administrative remedies, laches, estoppel and waiver. These contentions, however, are not presented on appeal because the trial court decided only that plaintiffs were not working during Code 7 time. As to defendants' other contentions, the court specifically made no decision on the merits.
[4]  The dispatchers have worked the same shifts as the police officers since approximately March 1979. Prior to that, each dispatcher was scheduled for an eight-hour shift.
[5]  Although it is unclear, it appears from the record before us that the restrictions on all the employees are substantially similar. This case has been certified as a class action suit and we can infer that all plaintiffs are similarly situated. At oral argument, plaintiffs' counsel represented that all the employees wore uniforms and badges and were under the same restrictions during their Code 7 periods. That representation was not, and has not, been challenged by defendants.
[6]  At trial, Police Chief Skeels testified that the officers could conduct personal business if they changed out of their uniforms. However, he had no knowledge as to whether or not the officers knew they could change out of uniform during Code 7 time. In fact, Officer Long testified that he had never been told he could remove his uniform and attend to private affairs during Code 7 time.
[7]  The Court of Appeal in Los Angeles reviewed the trial court's decision under the substantial evidence test. We would conclude, however, that this was an erroneous standard of review. The issue of whether an employee's noncompensatory mealtime has been so restricted as to convert it into hours worked, is a question of law. Thus, in reviewing the trial court's conclusion that the plaintiffs were not entitled to overtime compensation in this case, we look to see whether the trial court committed reversible error.
[8]  This provision is consistent with Labor Code section 510 which states, in relevant part, "[e]ight hours of labor constitutes a day's work, unless it is otherwise expressly stipulated by the parties to a contract."
[1]  It is true that the two-step analysis was also used in Los Angeles Fire & Protective League v. City of Los Angeles (1972) 23 Cal. App.3d 67, 76 [99 Cal. Rptr. 908]. A quick glance at that decision reveals the doubtful relevance of the first step to the question under consideration in that case as well as here: the decisions relied on are Garzoli v. Workmen's Comp. App. Bd. (1970) 2 Cal.3d 502 [86 Cal. Rptr. 1, 467 P.2d 833] and Guest v. Workmen's Comp. App. Bd. (1970) 2 Cal.3d 670 [87 Cal. Rptr. 193, 470 P.2d 1]. In each case it was held that workers' compensation was not barred by the going and coming rule  in Garzoli because the employee was riding a motorcycle to work as, in effect, required by his job, in Guest because he was on a special errand. In neither case was there an issue as to whether at the time of the accident in question the employee was on duty for pay purposes.
[*]   Assigned by the Chairperson of the Judicial Council.
