SAN FRANCISCO (CN) – A federal judge on Monday weighed whether the San Francisco Sheriff’s Office unconstitutionally deprives inmates of sunlight and outdoor exercise at two county jails.

“We’re talking about people who have been in jail for years and haven’t seen the sun,” said attorney Yolanda Huang, who represents seven inmates being held in prolonged isolation pending trial at either County Jail #4 at the San Francisco Hall of Justice or County Jail #5 in San Bruno.

The inmates filed a civil rights class action this past May to bar the county and its sheriff’s department from keeping inmates in their cells for more than 20 hours per day and to force them to provide every inmate with an hour of daily outdoor recreation.

U.S. District Judge Sallie Kim appeared skeptical of this claim. A few months ago, she took a private tour of the facilities alongside Huang and lawyers from San Francisco City Attorney’s office and noted that inmates had windows in their cells. She said the plaintiffs’ own expert had said some forms of artificial light could help combat the harmful physical and mental effects of natural sunlight deprivation.

Deputy City Attorney Kaitlyn M. Murphy said the county jails currently meet 14th Amendment standards. “The only injury is the disruption of circadian rhythm, but what we have seen is you don’t need access to sunlight to regulate circadian rhythm. It can be a meaningful alternative to have artificial light that is different than being outside,” she said.

Huang argued “institutional light in insufficient,” and that there have been no cases in which such alternatives are proven to work as well as sunshine. She also pointed out that the tour had been conducted at 11 a.m. and they were only showed one cell preselected by the sheriff.

“We were given one selected cell that the sheriff chose,” Huang said. “We don’t know what the light was like in the other cells. If your cell faces north, you’re not going to see the sun.”

In a motion to dismiss the case, the city and county argued the jails keep inmates indoors for security reasons and because outdoor recreation time would make it too hard for guards to facilitate required pill calls, legal visits, education time and prisoner transportation to court.

“There are legitimate reasons for the structure of the jail,” Murphy told Kim.

But Kim said she was concerned that San Francisco hasn’t built outdoor facilities because it doesn’t want to spend the money. “It’s not a legitimate government objective that it’s too expensive to do something,” Kim said.

Huang said her clients, only one of whom has been convicted of a crime, are at a greater risk for developing dementia. If they are eventually acquitted and released, she said, they will have to deal with chronic or incurable illnesses. Some are already complaining of migraines or have developed diabetes.

“For the city to argue that it meets the constitutional standard is embarrassing. I don’t think dogs in the pound are held in those conditions,” she said.

Outside the courthouse, Huang said an injunction will restore San Bruno inmates to the level of recreation they had prior to 2006, when the county built a new “state of the art” facility that did away with the old recreation yard which sits across the street, unused. The inmates’ lawsuit could force the county to re-open it.

“How hard would it be to put up a chain-link fence?” Huang said.

The Hall of Justice is slated for closure in 2021, and Mayor London Breed said last month she plans to move its current inmate population to temporary facilities that have yet to be determined.

“The Hall of Justice was never meant to house people for years,” Huang said. “It’s disgusting.”