
134 Cal.Rptr.2d 645 (2003)
109 Cal.App.4th 302
BUENA PARK MOTEL ASSOCIATION et al., Plaintiffs and Appellants,
v.
CITY OF BUENA PARK, Defendant and Respondent.
No. G029819.
Court of Appeal, Fourth District, Division Three.
May 9, 2003.
Rehearing Denied May 29, 2003.
Review Denied August 13, 2003.
*646 Frank A. Weiser, Los Angeles, for Plaintiffs and Appellants.
Quinn M. Barrow, City Attorney; Richards, Watson & Gershon, Gregory M. Kunert and Chandra Gehri Spencer, Los Angeles, for Defendant and Respondent.

OPINION
RYLAARSDAM, Acting P.J.
Plaintiffs, the Buena Park Motel Association and 12 of its members, filed suit for declaratory and injunctive relief against defendant City of Buena Park, contending two local zoning ordinances violate their constitutional rights. Ordinance No. 1340, adopted in 1996, made it unlawful for motel owners to rent their rooms to the same guest for 30 days or more. Three years later, the city council adopted ordinance No. 1399 to amend the earlier ordinance by making it unlawful for motel owners to rent a room to the same guest for 60 days or more in any 180 day period. Plaintiffs challenged the ordinances as an unreasonable and irrational exercise of defendant's police powers, as an unlawful taking of private property without just compensation, and as a violation of their right to the equal protection of the laws. The trial court entered judgment for defendant following a bench trial.
Plaintiffs appeal, contending the trial court erred in concluding their challenge to ordinance No. 1340 is barred by the statute of limitations and by ruling that the ordinances did not amount to an unlawful taking and did not violate plaintiffs' right to equal protection. We disagree with their contentions and therefore affirm.

FACTS
The individual plaintiffs are ethnic minority owners and operators of small to moderately-sized motels located in defendant City of Buena Park (the city). Several of the plaintiffs testified at trial that a significant portion of their guestsfrom 30 to 65 percentdesired to stay at their motels for more than 60 days. Such guests were comprised of business people, families, victims of domestic abuse, and individuals with a "day-to-day basis [of] income." Plaintiffs are unable to fill their room vacancies with short-term guests, i.e., tourists, and need long-term guests to survive economically.
Prior to 1996, some, but not all, of the plaintiffs had been issued conditional use permits which precluded them from renting a room to the same guest for longer than 30 days. Gary Hicken, the city's chief of police, testified that in 1994 or 1995, a neighborhood improvement task force was formed with the "intent to reduce the blight deterioration in the community and to ... improve the quality of *647 life...." Members of the task force inspected motels, hotels, apartments, and rental properties and found problems associated with long-term motel guests, such as cockroach infestations and filth. According to Chief Hicken, ordinance No. 1340 was created, in part, to enforce conditional use permits which limited guest stays to 30 days.
Ordinance No. 1340, adopted by the city council in mid 1996, added section 19.552.110 to the Buena Park City Code, making it "unlawful for any hotel, motel or motor hotel to rent or let, or otherwise provide for compensation, any room therein to any person, firm, partnership, corporation, association or other business entity for thirty (30) or more consecutive days...." The ordinance's stated purpose was "to ensure the continued availability of transient lodging within the City of Buena Park and to ensure the continued use of hotels, motels and motor hotels in the manner intended at the time of adoption of the Zoning Ordinance of the City of Buena Park." A violation of the ordinance constitutes a misdemeanor, and violators are subject to being fined $1,000 per day for each violation and/or imprisonment for up to six months. Only hotels or motels meeting certain development criteria, i.e., having a minimum of 75 guest rooms and a restaurant on or abutting the property, could qualify for a conditional use permit to exceed the 30-day limit.
Chief Hicken testified ordinance No. 1340 had a "[d]ramatic" impact, but it failed to eliminate the problems it was intended to rectify because motel owners had found ways to circumvent the 30-day stay rule. In some cases, guests desiring to stay long term would check out after 29 days, leave their belongings in the room, and then check back in the next day. In other cases, rather than check out after 30 days, multiple parties staying in the same room simply would be allowed to register under a different name. As a result, some rooms were not regularly cleaned.
Deborah Holland, a city code enforcement officer, had seen rooms where the odor was so bad no one could enter. "Odors from cooking foods, from urinating, from body odor, just uncleanliness." She had also seen rooms where there were rats, mattresses covered in feces, and cockroach infestations. These conditions typically were associated with long-term stays in motels.
In late 1999, the city council adopted Ordinance No. 1399 to prevent motel owners from circumventing the 30-day stay rule. The new ordinance amended subsection B of section 19.552.110 of the Buena Park City Code, making it "unlawful for any hotel, motel, or motor hotel to rent or let, or otherwise provide, any room therein to any person, firm, partnership, corporation, association or other business entity for thirty (30) or more consecutive days, or for more than sixty (60) total days in any one hundred and eighty (180) consecutive day period.. .." The ordinance further provided, "It is the intent of this section that if a room is rented, let or otherwise provided to any party for either of the maximum time periods allowed by this section, then such room may not again be rented, let or otherwise provided to the same party or to any individual, firm, or entity that was a member of said party." The penalties for violating the ordinance remained the same as before; the development criteria for obtaining a conditional use permit to exceed the 30-day or 60-day stay limits likewise were unchanged.
In March 2000, plaintiffs filed suit contending the ordinances violated their constitutional rights. Specifically, they alleged the ordinances were an unreasonable and irrational exercise of the city's police powers, resulted in a taking of their private *648 property without just compensation, and deprived them of their right to the equal protection of the laws. As to the latter claim, plaintiffs asserted the motivation for the adoption of the ordinances was "to rid the City of motels owned and operated by ethnic minorities and the guests who stay at such hotels." A moratorium against enforcing the ordinances has been imposed pending resolution of the case.
The trial court entered judgment in favor of the city after a bench trial. The court concluded plaintiffs' challenge to ordinance No. 1340 was barred by the 90 day statute of limitations set forth in Government Code section 65009. The court found ordinance No. 1399 constituted a valid exercise of the city's police power and that it had "a substantial relation to the public health, safety, morals and general welfare." The court further found the ordinance did not constitute a prohibited taking as it was not arbitrary and it did not "unduly restrict the use of private property," but "merely diminishe[d] the owners' use or value" of their property. Moreover, the court found that plaintiffs failed to meet their burden to show that they had a preexisting right to rent rooms for longer than 30 days or that renting their rooms to long-term residents was otherwise lawful. As to the equal protection claim, the court determined there was "no shred of evidence" the city intended to discriminate against plaintiffs because of their ethnicity or that it was "trying to drive [out] low income people." Thus, the court concluded "[t]he ordinances are not arbitrary and are rationally related to legitimate government interests]."

DISCUSSION

Plaintiffs' Challenge to Ordinance No. 1340 is Barred by the Statute of Limitations
Plaintiffs' arguments on appeal encompass both ordinances, but defendant contends the trial court correctly held that plaintiffs are barred from challenging the validity of ordinance No. 1340. We agree.
There is a 90-day limitations period on challenges to the validity of a local zoning regulation. (Gov.Code, § 65009, subd. (c)(1)(B).) "If the challenge is to the facial validity of a land-use regulation, the statute of limitations runs from the date the statute became effective." (Hensler v. City of Glendale (1994) 8 Cal.4th 1, 22, 32 Cal.Rptr.2d 244, 876 P.2d 1043; see also Save Our NTC, Inc. v. City of San Diego (2003) 105 Cal.App.4th 285, 291-292, 129 Cal.Rptr.2d 306.) Once the statute of limitations has expired, "all persons are barred from any further action or proceeding." (Gov.Code, § 65009, subd. (e).)
Ordinance No. 1340, which first imposed the 30-day stay rule and created city code provision section 19.552.110, was adopted in August 1996. Plaintiffs did not challenge its validity until March 2000. It is evident their challenge to this ordinance and the related code provision is untimely. Thus, plaintiffs are precluded from challenging ordinance No. 1340 and those portions of the related city code provision which were not altered by the later ordinance. (Gardt v. City of Riverside (1991) 2 Cal.App.4th 259, 289-290, 3 Cal.Rptr.2d 504, disapproved on other grounds in Morehart v. County of Santa Barbara (1994) 7 Cal.4th 725, 743, fn. 11, 29 Cal. Rptr.2d 804, 872 P.2d 143.)
Plaintiffs argue their challenge to ordinance No. 1340 is not time-barred because it is preempted by state laws which permit cities and counties to levy a tax for transient occupancy of 30 days or less (Rev. & Tax Code, § 7280, subd. (a)), and distinguish transient occupancy (30 days or less) from other types of tenancy (Civ.Code, §§ 1940, subd. (a), 1940.1). We conclude otherwise.
The state Constitution authorizes cities and counties to "make and enforce within its limits ... local ... ordinances *649 ... not in conflict with general laws." (Cal. Const., art. XI, § 7.) A local ordinance conflicts with general law if it is duplicative of or contradictory to it, or if it "enters an area that is `fully occupied' by general law...." (Sherwin-Williams Co. v. City of Los Angeles (1993) 4 Cal.4th 893, 897-898, 16 Cal.Rptr.2d 215, 844 P.2d 534.)
Ordinance No. 1340 does not duplicate or contradict the statutes cited by plaintiffs. While the statutes refer to transient occupancy, each has a focus apart from the challenged ordinance. Revenue and Tax Code section 7280, subdivision (a) simply permits local governmental entities to levy what is commonly referred to as a hotel bed tax. The statute's "definition of `transient' ... does not preempt the field or prevent [a city] from adopting another definition of `transient.'" (City of San Bernardino Hotel/Motel Assn. v. City of San Bernardino (1997) 59 Cal.App.4th 237, 244, 69 Cal.Rptr.2d 97.) Civil Code sections 1940 and 1940.1 are part of a greater legislative scheme enacted to protect a class of tenants who are not subject to the hotel bed tax provision, i.e., persons who rent rooms as month-to-month tenants. (Id. at pp. 244-245, 69 Cal.Rptr.2d 97.)
Citing Anza Parking Corp. v. City of Burlingame (1987) 195 Cal.App.3d 855, 241 Cal.Rptr. 175 (Anza) and Palazzolo v. Rhode Island (2001) 533 U.S. 606, 121 S.Ct. 2448, 150 L.Ed.2d 592 (Palazzolo), plaintiffs alternatively contend their challenge to ordinance No. 1340 is not barred because the ordinance is void and constitutes an unreasonable exercise of the city's authority. We find both cases factually distinguishable. Anza held the statute of limitations did not apply because the municipal zoning authority lacked subject matter jurisdiction to enforce a nontransferable condition attached to a conditional use permit. (Anza, supra, 195 Cal.App.3d at pp. 860-861, 241 Cal.Rptr. 175.) We further note Anza's holding has been criticized as inconsistent with the Legislature's express intent in Government Code section 65009 to preclude delayed challenges to zoning ordinances. (See Gonzalez v. County of Tulare (1998) 65 Cal.App.4th 777, 790, 76 Cal.Rptr.2d 707 [Anza "stands on its head the Legislature's intent to ensure the quick resolution of challenges to local planning and zoning decisions"].)
The issue in Palazzolo was whether a purchaser of property could challenge a regulation which had been in effect at the time of his acquisition of title. (Palazzolo, supra, 533 U.S. at p. 626, 121 S.Ct. 2448.) The state court essentially held that "[a] purchaser or successive title holder ... is deemed to have notice of an earlier-enacted restriction and is barred from claiming that it effects a taking." (Ibid.) In other words, whatever rights existed to develop the property before the challenged zoning restrictions went into effect never belonged to the plaintiff who purchased the property with notice of the restrictions. The Supreme Court reversed that holding, reasoning that such a rule, "in effect, ... put an expiration date on the Takings Clause." (Id. at pp. 627, 632, 121 S.Ct. 2448.) The case did not involve a statute of limitations, however.
But even if we construe Palazzolo as permitting a recent purchaser of private property to circumvent the statute of limitations to challenge a preexisting zoning ordinance, the case does not apply to the facts at issue here. There simply is no evidence in the record that any of the plaintiffs purchased their property after ordinance No. 1340 took effect. In sum, we conclude the 90-day limitation period bars plaintiffs from challenging the validity of ordinance No. 1340.

Ordinance No. 1399 Does Not Constitute an Unlawful Taking of Private Property
Plaintiffs contend Ordinance No. 1399 constitutes an unconstitutional taking without *650 just compensation by partially depriving them of an economically viable use of their properties. We are not persuaded.
Governmental entities are prohibited by the state and federal Constitutions from taking private property for public use without paying just compensation. (Kavanau v. Santa Monica Rent Control Bol. (1997) 16 Cal.4th 761, 773, 66 Cal.Rptr.2d 672, 941 P.2d 851.) "[An] [ordinance] that deprives a property owner of `all economically beneficial or productive use of land' effects a taking requiring just compensation. [Citations.]" (Id. at p. 774, 66 Cal.Rptr.2d 672, 941 P.2d 851.) An ordinance may also constitute a taking even though it "leaves the property owner some economically beneficial use of his [or her] property." (Ibid., italics omitted.) In assessing whether an ordinance constitutes a prohibited taking, we look at "the economic effects of the [ordinance] and the government's purpose. [Citations.]" (Id. at p. 776, 66 Cal.Rptr.2d 672, 941 P.2d 851.) An ordinance regulating the use of private property effects a taking if it fails to substantially advance legitimate governmental interests. (Ibid.; Agins v. City of Tiburon (1980) 447 U.S. 255, 260, 100 S.Ct. 2138, 65 L.Ed.2d 106.)
In concluding the ordinance did not effect a taking, the trial court determined the time limits imposed on guest stays at plaintiffs' motels were not unduly restrictive, but "merely diminishe[d] the owners' use or value" of their property. The court also found plaintiffs failed to show that any past use of their property for long-term residents had been legal. But the record is to the contrary. Evidence was presented at trial showing that conditional use permits issued for some of the motel properties as far back as 1983 prohibited motel guest stays exceeding 30 days. The parties also stipulated that not all of the plaintiffs' properties were subject to a conditional use permit. Consequently, before ordinance No. 1340 was adopted in 1996, it appears guests legally could stay longer than 30 days at some, but not all, of the motels. However, because plaintiffs failed to timely challenge the earlier ordinance, they cannot now claim they were deprived of an entitlement to any past legal nonconforming use status.
Thus, the critical question is not whether plaintiffs had ever been legally permitted to rent their rooms to the same guest for more than 30 consecutive days; rather, it is whether the city's adoption of an ordinance restricting the duration of guest stays was arbitrary and unreasonable. We conclude, as the trial court did, that it was not.
The city adopted ordinance No. 1399 after discovering that some motel owners were circumventing the 30-day stay rule imposed by ordinance No. 1340 by allowing guests to live in the motels on a long-term basis which, in some instances, resulted in rooms not being regularly cleaned. This, in turn, created sanitation problems affecting the public health and safety. Limiting returning guest stays at any particular motel to a maximum of 60 days within any 180 day period was a reasonable and legitimate means of addressing these problems.
Plaintiffs assert the 60-day maximum time limit is facially inconsistent with the 30-day stay rule. We read ordinance No. 1399 as permitting multiple stays by the same guest at a particular motel within any 180 day period that individually do not exceed 30 consecutive days and cumulatively do not exceed 60 days. We do not find these time periods to be contradictory. And the 60-day restriction, along with the record keeping requirements imposed under the ordinance, serve to advance the city's legitimate goal of preventing motel owners from circumventing the 30-day stay rule.
*651 While plaintiffs undoubtedly will be economically impacted by the enforcement of ordinance No. 1399, they will not be deprived of all "economically viable use[ ] of their property." (Ewing v. Carmel-by-the-Sea (1991) 234 Cal.App.3d 1579, 1592, 286 Cal.Rptr. 382.) Based on plaintiffs' testimony, between 35 to 70 percent of their guests stay for less than 30 days. This segment of plaintiffs' business is unaffected by the ordinance. And plaintiffs retain some flexibility to accommodate longer-term guests so long as their stays do not exceed 60 days in any 180 day period. Plaintiffs may also be able to modify their properties to meet the criteria for obtaining a conditional use permit allowing long-term residents. While some of plaintiffs' guests may decide to stay at motels outside of the city that are not subject to similar restrictions, others may elect to remain in the city and move from motel to motel. Thus, plaintiffs will not necessarily suffer a complete loss of business associated with long-term guest stays.
By augmenting the 30-day stay rule to preclude guest stays exceeding 60 days within any 180 consecutive day period, the city balanced plaintiffs' right to use their property for extended stays with the public's interest in having all motel rooms regularly cleaned. Thus, we conclude the restrictions imposed by ordinance No. 1399 substantially advanced the city's interest in maintaining sanitary, pest-free conditions at the motels.

Plaintiffs Failed to Show Ordinance No. 1399 Violated Their Right to Equal Protection
To support their equal protection claim, plaintiffs summarily argue the ordinances "cannot pass scrutiny because ... they are facially contradictory and therefore inherently arbitrary and irrational." Plaintiffs conceded at oral argument the trial court properly found there was no evidence the city intended to discriminate against plaintiffs because of their ethnicity. In the absence of such evidence, plaintiffs' claim is reviewed under the rational basis test. Equal protection "require[s] that persons similarly situated with respect to the legitimate purpose of the law receive like treatment. [Citations.]" (College Area Renters and Landlord Assn. v. City of San Diego (1996) 43 Cal.App.4th 677, 686, 50 Cal.Rptr.2d 515, italics omitted.) In such cases, "[a] zoning ordinance may not rely on a classification whose relationship to an asserted goal is so attenuated as to render the distinction arbitrary or irrational. [Citation.]" (Ibid.)
Ordinance No. 1399 applies equally to all hotels, motels, and motor hotels within the city that do not meet the development criteria necessary to obtain a conditional use permit allowing for guest stays exceeding 30 days. The purpose of the ordinance, as previously stated, is to ensure guest rooms within these business entities are regularly cleaned and kept free from pests. The evidence presented at trial showed the city had experienced sanitation problems at some motels where guests were allowed to stay in the same room for more than 30 days. The ordinance is appropriately directed at the use of motel rooms, rather than their users. As such, it is rationally related to the city's legitimate interest in maintaining clean motel rooms and protecting public health.

DISPOSITION
The judgment is affirmed. The parties shall bear their own costs on appeal.
WE CONCUR: ARONSON and IKOLA, JJ.
