In California, it pays to hold onto your allotted vacation days, at least if you’re a state government worker.

A Los Angeles Times study of payroll data from the state controller’s office has found that the Golden State paid nearly $300 million for banked time off in 2018.

The controller’s office referred Fox News to the California Department of Human Resources, which did not immediately respond to a request for comment.

The data included most agencies and departments, excluding legislative employees and workers at public universities.

One recently retired employee, Bijan Sartipi, who worked as a transportation engineer, received a payout of $405,000 for time off he never used, according to the news organization's research.

The state does have a cap on vacation accrual but enforcement is lax, leaving state workers to retire with massive compensatory payouts. California mandates vacation balances for most employees be capped at 640 hours.

The state is obligated to make the payment, inevitably leaving lawmakers to cut programs from other departments to balance the budget and offset the costs of that vacation hoarding.

“You wait for the guy to retire and then you send him a $300,000 check. … In a budget surplus mode like right now it’s great, but if you’re in a recession it sucks,” said Republican state Sen. John Moorlach.

SUSPECT IN UC-BERKELEY ATTACK HAD HISTORY OF LEGAL TROUBLE, LAWYER SAYS

“It is just so onerous, and this is not just at the state level, this is at the county and city level, too.”

Moorlach said the issue can be addressed starting with Gov. Gavin Newsom, a Democrat.

“At least Governor [Jerry] Brown tried to give them the opportunity to try and pay it down; it seems to me it has to start at the bargaining table,” he said.

The study found state workers had $3.5 billion in unused leave as of 2017, creating a massive unfunded liability for the state.

The analysis also found that vacation payouts can far surpass annual salaries. For example, if an employee cashes out stored-up leave, California pays them for the hours accrued. In addition, the state projects how much additional time he or she would have earned for actually taking those days off.

Plus, state labor code requires compensation for unused days based on the employee’s final pay rate, so the actual cost of each vacation hour increases over time.

CLICK HERE TO GET THE FOX NEWS APP

Moorlach is pessimistic that there is a quick and simple remedy. He says it would be tough to negotiate an even harsher cap on unused vacation hours with government employee unions.

“Can we fix this?" he asked. "Probably not.”