Penal Code section 2900.5 allows for presentence credits to be simultaneously awarded to both concurrent sentences when they are imposed at the same time. The purpose of the statute is to equalize the total time in custody between those who were incarcerated presentence and those who were not. Kunath was arrested on charges and released on bail. A short time later he was arrested on new, unrelated charges and was held pending trial. He entered a plea on both cases and sentence was imposed at the same time. There was disparate credit with full custody credits on one sentence and only the few days that did not overlap as custody on the earlier case. People v. Bruner (1995) 9 Cal.4th 1178, 1192, fn. 9, provides guidance that when concurrent sentences are imposed at the same time, presentence custody is credited against all. The logical application of credit to both concurrent sentences is necessary to equalize the sentence with that of an inmate who was free pending sentencing.