NORTH BRUNSWICK — He was sentenced to 30 days in the county jail.

But Dharun Ravi, the former Rutgers University freshman convicted in the spycam case that sparked a national debate over cyberbullying, will likely serve just 20 days behind bars.

That’s because a custodial sentence to county jail in New Jersey carries with it an asterisk.

Under state regulations, any inmate handed a 30-day sentence is automatically credited with 10 days for good behavior, said Edmond Cicchi, warden of the Middlesex County Adult Correction Center where Ravi will serve his time.

Disclosure of the built-in credit, shaving off a third of his already brief sentence, came during a tour of the North Brunswick facility Ravi will call home beginning May 31.

Ravi’s credits for jail time were the source of some discussion during a sentencing hearing Monday, when Superior Court Judge Glenn Berman declined to credit the 20-year-old for any time served when he was first arrested.

But like actress Lindsey Lohan — released from a Los Angeles County jail less than five hours after she arrived to serve a 30-day sentence for violating probation — short-term inmates in county jails are seldom kept for their full terms unless they are charged with rules infractions, officials said.

Ravi was convicted in March of spying on his roommate, Tyler Clementi, during an intimate encounter with another man in September 2010. Days after the incident, Clementi jumped to his death from the George Washington Bridge. Ravi did not face any charges in Clementi death.

Dharun Ravi sentencing 53 Gallery: Dharun Ravi sentencing

Found guilty on 15 counts of invasion of privacy, bias crimes and hindering prosecution, Ravi was facing 10 years in prison. Instead, Berman, who sharply rebuked Ravi for failing to apologize for his actions, sentenced him on Monday to 30 days behind bars and three years of probation.

Middlesex County Prosecutor Bruce Kaplan called the sentence insufficient. First Assistant Prosecutor Julia McClure said she will appeal the sentence.

When he arrives at the county jail, Ravi will be confined to a unit with drab blue-green concrete walls and floors, bolted-down metal-framed bunk beds and narrow windows looking out at chain-link fences topped with razor wire.

Most inmates are awaiting trial on charges ranging from lewdness and serious motor vehicle offense to murder. The jail also houses inmates with sentences of up to 364 days.

As with any inmate, Ravi will begin with medical and mental examinations, then receive a classification for his assignment. He could be placed in a maximum setting, in a two-person, 15-by-10-foot cell behind a heavy metal door. Or he could be in a less restrictive minimum security pod, with 10-by-20-foot cubicals with four bunk beds.

"During intake, everything goes into how we can make sure that person is safe and secure," Cicchi said. "Our job is for a person to come into the house and then leave the house the same way, or even better."

Any inmate seriously fearful of the prison surroundings can be placed in protective custody, a private cell where he stays 23 hours a day with no television or contact with others.

The daily routine includes a 5:15 a.m. wake-up for breakfast. Lunch is served at 11:30 and dinner is at 5 p.m. All meals are served on trays delivered to the same pods where the inmates are housed. There is the daily recreation hour, and lights out is at 9 p.m. Inmates are allowed to shave, under supervision, on Mondays, Wednesday, and Fridays.

nj.com-phone-app-pic3.jpg

STAY CONNECTED 24/7

Download our

free NJ.com mobile and tablet apps

to keep up with the latest New Jersey news, sports and entertainment.

While he will have access to recreation facilities for about an hour a day, his reading will be limited to material from the jail library. There is no internet.

"Three hots and a cot," Cicchi said of the daily routine.

"Ravi will feel an initial shock, but he will adjust," said the Rev. Sean Winter, chaplain for the jail and director of prison ministries for the Diocese of Metuchen. "He’s going to lose his freedom. That’s prison life. Mr. Ravi is going to be fine. He just has to be himself."

Visitations are weekly and consist of a 20-minute video conference. Inmates look into a monitor in their pods and talk over a telephone to relatives or friends standing in front of monitor in the jail lobby. Inmates get monthly face-to-face meetings, but Ravi will not be incarcerated that long.

Classes are offered for inmates work for high school equivalence diploma or learn the basics of using a computer, which would probably be of little interest to Ravi. Even if they did, he would hardly be in the jail long enough to apply and start a class.

Related coverage:

• Dharun Ravi sentence: 30 days in jail after a dramatic day in court

• O'Brien: Dharun Ravi sentence would sit better if it came with an apology

• Di Ionno: Why Dharun Ravi didn't apologize

• Editorial: Dharun Ravi sentence: Bravo to brave judge

• Dharun Ravi's sentence a surprise to legal experts, though appeal could come

• Dharun Ravi sentencing, count by count

• Dharun Ravi trial: Videos from the courtroom