
546 So.2d 1091 (1989)
CITY OF MARGATE, Florida, Appellant,
v.
AMOCO OIL COMPANY, Appellee.
No. 87-0920.
District Court of Appeal of Florida, Fourth District.
June 21, 1989.
Rehearing Denied July 21, 1989.
Eugene M. Steinfeld, City Atty., Margate, for appellant.
Glenn N. Smith and John H. Pelzer of Ruden, Barnett, McClosky, Smith, Schuster *1092 & Russell, P.A., Fort Lauderdale, for appellee.

ON REHEARING
DOWNEY, Judge.
Appellee, Amoco Oil Company (Amoco), applied to appellant, City of Margate (the City), for a permit to construct a gasoline service station and mini-mart upon a parcel of land within the city, which Amoco held under contract. The City denied the requested permit and Amoco instituted this suit for declaratory and injunctive relief. From a final judgment in favor of Amoco, holding that Margate acted illegally in the premises, the City has perfected this appeal.
The primary issue presented on appeal is whether the trial court erred in determining that the City acted illegally in denying the permit requested in 1980. Secondary issues involve the question of what law applies  the law in existence at the time of the application or, as the City describes it, "current law," which we take to mean the law in effect at the time of the judgment.
The case was tried before the court for approximately eight days over a ten-month period, after which the chancellor entered a very comprehensive, analytical final judgment, including extensive findings of fact and conclusions of law, which have facilitated our appellate review. Based on our consideration of the appellate briefs, the exhibits, and the record generally, we conclude that reversible error has not been demonstrated.
A brief resume of the facts as found by the trial court reveals that Amoco filed an application for a permit with the City to construct and operate a gasoline service station and mini-mart within the city in a zoning district designated "B-2." Both "service stations" and "filling stations" were permitted uses within said district; however, pursuant to section 3.18 of the Code, "filling stations" had certain special conditions, while "service stations" had none. Among the limitations on the use of the property for "filling stations" was that such use was not permitted within 750 feet of another plot used as a filling station nor within 250 feet of any plot used as a church, playground, hospital, or public school. These limitations were prompted for "filling stations" as opposed to "service stations" because the former, by definition, allowed a more intensive use of the property. For example, a service station was permitted to dispense at retail only automobile fuels and oil; whereas, a filling station was authorized to furnish, in addition, supplies, equipment, and minor repair services. The latter is defined in the Code as "incidental body or fender work, or other minor repairs, painting or upholstering, replacement of parts, and motor service to passenger cars and trucks not exceeding 1 1/2 tons capacity."
Amoco's application was referred to the City Development Review Committee, which the court found refused to follow the distinction between service and filling stations and characterized Amoco's application as an application for filling station use. Having taken that position, the committee naturally applied section 3.18 of the Code and noted that the site in question was within 250 feet of a commercial nursery known as The Country Day School, which had a fenced-in play area. The committee thus denied approval of the Amoco application because of the 250 foot playground limitation of section 3.18 and because it violated the platting requirements of section 3.10.1 of the Code. It is interesting to note that the evidence showed that this 250 foot limitation had never been invoked before in a similar situation; that it was seriously suspected to be constitutionally flawed because there was no inverse requirement prohibiting playgrounds from being located in close proximity to filling stations. City of Miami v. Woolin, 387 F.2d 893 (5th Cir.1968); Saar v. Town of Davie, 308 F. Supp. 207 (S.D.Fla. 1969). In addition, the City dropped the alleged platting ordinance violation as a ground for denial of the permit because it, too, was recognized as probably unconstitutional and it was subsequently repealed.
Amoco then requested the matter be referred to the city attorney, who in turn placed it on an agenda to be considered by *1093 the city commission. After a hearing, and extensive discussion, the commission supported the Development Review Committee's decision and rejected the application. Based upon the evidence presented, the trial court concluded that the commission determined that, regardless of the Code provisions, they did not want a gasoline station in this locality.[1]
The trial court found that Amoco took no immediate action to challenge the City's rejection because it wanted to try to resolve the problem amicably and avoid litigation with the city in which it would be operating. Instead, Amoco applied for a rezoning of the property to a B-3 classification, which would permit its contemplated use. When all else seemed futile, Amoco commenced this suit in July 1982 to enforce its rights as it envisioned them. The court found that, after the City originally denied Amoco's permit application, it set about to change the Code so that Amoco's intended use of the property could not be legally permitted. Thus, on September 24, 1980, the City enacted Ordinance 1500.191, which the trial judge characterized as having the effect of devastating the Amoco site plan. The new ordinance abolished the distinction between a service and a filling station; it eliminated the 250 foot limitation and amended section 3.18 so that Amoco's site plan would not comply by increasing the 750 foot limitation between stations to 1000 feet (Amoco's site is 962 feet from another station site). It provided that no station driveway could open on a street 60 feet or less in width. Amoco's plan provided for a driveway opening on a street exactly 60 feet in width. Before the amendment, section 3.18 contained no limitation on the size of streets abutting a station driveway. Furthermore, the ordinance enlarged the size of a station plot so that the minimum size is .5 acres. Predictably, Amoco's plot is .46 acres. Then, on November 5, 1980, the City enacted Ordinance 1500.198, which completely eliminated gas stations as a permitted use in B-2 districts.
In this case, Amoco attacked the validity of the new ordinances, 1500.191 and 1500.198, because they were not properly enacted since they did not comply with the publication requirements of section 166.041, Florida Statutes, which the trial court held were "mandatory and jurisdictional" requirements. The City thereupon, while this suit was pending, enacted two additional ordinances, 1500.227 and 1500.244, on November 16, 1982, which revised the permitted uses in the B-2 and B-3 zones and prohibited gasoline stations and mini-markets in B-2 zones. Thereafter, the City contended that, regardless of the illegality in the City's rejection of Amoco's application in the first instance, the subsequent enactment of Ordinances 1500.227 and 1500.224 controlled Amoco's rights vis-a-vis the permitted use of this property.
The trial judge expressly stated that he recognized and was mindful that municipal legislation of this character is entitled to a strong presumption of correctness; that the court is not a super-zoning board and should not substitute its judgment for that of the City; and that "mere debatability regarding the rationale for, and the desirability" of, such ordinances is not sufficient to render them unconstitutional. Nevertheless, the court concluded that Amoco was entitled in 1980 to a permit based on its application and site plan because it met the municipal code in existence at the time. He found that the denial of Amoco's application and the City's subsequent actions "clearly demonstrate that the City's original denial of the Amoco site plan was done to gain the City time to pass new laws which would prevent the construction of *1094 the Amoco service station on the property." Therefore, the court found the City acted "arbitrarily, capriciously, discriminatorily and illegally" in denying the permit and, thus, created an estoppel to enforce the new ordinances which purported to change the permitted use of the property by Amoco. The court relied upon such cases as Aiken v. E.B. Davis, Inc., 106 Fla. 675, 143 So. 658 (1932), Dade County v. Jason, 278 So.2d 311 (Fla. 3d DCA 1973), and others, to which we would add Davidson v. City of Coral Gables, 119 So.2d 704 (Fla. 3d DCA 1960), cert. discharged, 126 So.2d 739 (Fla. 1961).
The City argues that, even though the procedure in enacting the subsequent ordinances did not technically conform to the advertisement requirements of section 166.041, the trial court should not have relied upon the invalidity of the law absent a vested right/equitable estoppel, citing City of Fort Pierce v. Davis, 400 So.2d 1242 (Fla. 4th DCA 1981). In that case, however, this court simply held that equitable estoppel would not apply to enjoin the City from readvertising and holding a public hearing, etc., to readopt the ordinance in question, which was void for failure to give the notice. Davis is distinguishable from the instant case because it did not involve an arbitrary and capricious denial of a permit to construct a lawful use. In Davis, a permit was granted and then a neighbor sought to change the zoning. In this case, the City illegally denied a permit that should have been issued and then tried to pass ordinances that would authorize a denial. This evidences bad faith and an avoidance of duty, such that estoppel should apply. A public body may not defend its unauthorized actions by subsequently passing or obtaining authorization. Gulfstream Park Racing Association, Inc. v. Division of Pari-Mutuel Wagering, 407 So.2d 263 (Fla. 3d DCA 1981).
No zoning change was pending at the time of Amoco's application that would prohibit service stations on Amoco's site (making City of Pompano Beach v. Yardarm Restaurant, Inc., 509 So.2d 1295 (Fla. 4th DCA 1987), distinguishable) and, if there is a finding of bad faith, or unreasonable refusal, or delay in an application, then the law at the time of the application should be applied. Where a governmental body acts arbitrarily to avoid its duty by delaying the matter so as to effectuate a change in the law adverse to the application, it is proper for the court to disregard the newly enacted limitations. Davidson v. City of Coral Gables, 119 So.2d 704 (Fla. 3d DCA 1960). As noted by the Third District Court of Appeal in Dade County v. Jason, 278 So.2d 311, 313, n. 1 (Fla. 3d DCA 1978):
If ... action on the application is unreasonably refused or delayed until after the change has become effective, or the issuing officer arbitrarily fails to perform a ministerial duty to issue the license or permit promptly on an application which conforms to the law at the time of filing, the courts have held that the law at the time of filing of the application controls.

Based upon its findings of fact and conclusions of law, the trial court ordered the City to take appropriate action to approve Amoco's site and other plans connected with the intended use of the property in accordance with city ordinances in effect in March 1980. We affirm that judgment.
LETTS and STONE, JJ., concur.
NOTES
[1]  The court cited the following rather amusing statement of one of the commissioners, made during the discussion of the Amoco application:

"I used to close my eyes and say I wouldn't want it in my backyard, but I would want it in somebody else's back yard... . but at this time, it happens when I do close my eyes and say I wouldn't want it in my own back yard, it is in my back yard. It is around the corner from me and I say is there any way possible that the land could be sold to some other kind of firm or other kind of outfit besides that? I realize that the zoning B-2 would allow him to put in a filling station but not a repair shop... . It is a beautiful corner but this time I have to open my eyes and go the opposite way and I don't think it is going to be favorable for putting a station at this time."
