HARRISBURG, Pa. (AP) — State lawmakers gave their final approval to new restrictions on fireworks Friday but the rules will not be in place as July Fourth weekend fireworks light up Pennsylvania skies.

The House voted 163-37 to send the legislation to the desk of Democratic Gov. Tom Wolf, whose spokeswoman said he plans to review it. The law would take effect in two months.

The bill would let municipalities restrict the use of fireworks to 10 a.m.-10 p.m. except during July 2-4 and Dec. 31, when they can be used until 1 a.m. The law allows their use on those holidays and over the Memorial and Labor Day weekends.

There are also more severe penalties for improper sales or illegal use.

Those who plan to set them off will have to give nearby livestock owners or managers three days’ notice before fireworks can be used near an animal housing facility. Local governments now have explicit authority to ban them if there is not a place to use them safely.

A 2017 law greatly liberalized the sale of fireworks in Pennsylvania but also has generated complaints from neighbors. Firefighters say it has resulted in more fires and fire deaths.

Until the 2017 law change, fireworks in Pennsylvania were largely limited to sparklers and similar novelties. The changes permitted the sale of the full array of fireworks that meet federal consumer standards.