Mack’s 1995 conviction for robbery was vacated following the grant of habeas corpus relief in federal court based upon the denial of the trial court to allow Mack to represent himself. When the case returned for retrial, Mack entered a negotiated plea to robbery. He was awarded credit for the prison time already served on the conviction, and requested that the trial court award him in prison conduct credits at a rate of one-half pursuant to Penal Code section 2930, or one-third pursuant to section 4019. The trial court determined the prior sentence to be time served under the three strikes law, which was not subject to half-time credits. The appellate court here reversed. Defendant’s time in custody prior to the invalidation of the judgment should be viewed as time spent in custody prior to conviction, and his entitlement to conduct credits should be measured accordingly.