A second California court has upheld a state law which, among other things, prevents the abusive practice of "pension-spiking" by current government employees.

The ruling, which allows changes to how promised state employee pensions are calculated, is significant because it touches on one of America's little-noticed ticking time bombs — the trillions of dollars in unfunded liabilities that states and municipalities owe in the future to their employees.

This ruling states that as long as state employees receive a "substantial" and "reasonable" pension, the state is making good on its obligations to them in the state constitution. In August, another California court had held that "[w]hile a public employee does have a 'vested right' to a pension, that right is only to a 'reasonable' pension — not an immutable entitlement to the most optimal formula of calculating the pension."

These two rulings, if upheld, offer some hope for California to fix its pension systems. The California Public Employees' Retirement System, or CalPERS, is only 68 percent funded right now. Pension costs have long been the unsung villain behind many states' and municipalities' fiscal problems. In California and other states, they have been exacerbated by politically motivated investment decisions and anemic annual returns compared to both the market and their over-optimistic projections. In fiscal 2016, which ended in June, CalPERS earned less than a 1 percent return, a far cry from the 7.5 percent annual return that it banks on when calculating its future soundness.

California courts have long held that pension benefits cannot be scaled back in any way from the rules in place when an employee was first hired. The big question is whether the state Supreme Court will uphold these new rulings to the contrary.

Pension liabilities usually loom so far in the future that politicians can paper them over during discussions of state finances. But the desperate race by many states and municipalities to make good on pensions often affects the level and quality of current government services that taxpayers expect. When governments fail to make needed contributions, spending the money instead on current programs, they dig themselves a hole, which in turn gets worse when market conditions deteriorate and they fail to earn expected returns.

Other reasons pension systems fall behind is that they make unrealistic promises, and that employees find ways to game the system and drain it faster than expected. "Pension-spiking" is one example — it allows employees take a large amount of deferred compensation in their last year of employment, so that their pensions are calculated using an artificially high estimation of their earnings on the job. Vacation days, bonuses and other one-time compensation gets cashed out all at once to "spike" an employee's pension over the long haul.

California could be spared if these two rulings are upheld. Many states have successfully reformed their pension systems and limited their future liabilities, but for an example of a state where the courts have prevented reform, one need only look to Illinois. Its state government is in poverty, and has to pay I.O.U.s not only to contractors but even to its lottery winners, mostly because the state is being crushed by pension obligations.

Illinois has a $130 billion unfunded pension liability, to say nothing of its municipalities. Its pension systems are less than 38 percent funded, according to the non-partisan state Commission on Government Forecasting and Accountability.

The Illinois Supreme Court has repeatedly blocked even relatively modest pension reforms for both state and city employees. The only way the Prairie State can make changes, the courts have indicated, is through the collective bargaining process, meaning the unions would have to give up long-term benefits voluntarily. This is why Illinois is often discussed as a candidate for a future sovereign default, and it probably figures as well in the current population exodus from the state. This is why both Illinois' debt-holders and its congressional delegation took so much interest in the 2016 debate in Congress over whether Puerto Rico would be allowed to seek bankruptcy protection.

California can escape Illinois' future, if its high court is willing to let these rulings stand.