No person, while being held for trial or awaiting a verdict, shall be subjected to punishment or penalty other than arrest or confinement upon the charges pending against him or her, nor shall the arrest or confinement imposed upon such person be any more rigorous than the circumstances require to insure his or her presence and the safety of others, but he or she may be subjected to minor punishment during such period for infractions of discipline. Any person placed in confinement while being held for trial or awaiting a verdict shall be given administrative credit for such time to offset any sentence subsequently imposed.