
77 Cal.App.3d 732 (1978)
143 Cal. Rptr. 686
THE PEOPLE, Plaintiff and Respondent,
v.
RICHARD JAMES MEYERS, Defendant and Appellant.
Docket No. 30747.
Court of Appeals of California, Second District, Division Five.
February 17, 1978.
*733 COUNSEL
Paul Halvonik, State Public Defender, under appointment by the Court of Appeal, Charles M. Sevilla, Chief Assistant State Public Defender, Jonathan B. Steiner and Russell I. Lynn, Deputy State Public Defenders, for Defendant and Appellant.
*734 Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, James H. Kline and Donald F. Roeschke, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
KAUS, P.J.
In case A438396 defendant pleaded guilty to second degree burglary in August 1975, and was placed on probation, subject to serving one year in the county jail with no credit given for time served. Defendant claims that he was incarcerated from the time of his arrest in April 1975 until the end of his one-year county jail term in October 1976.[1] We can assume that as of 1977 defendant had spent more than one year in jail on the 1975 burglary charge.
In February 1977, in case A-017430, defendant was charged in a two-count information with second degree robbery and second degree burglary; a prior felony conviction was alleged. At the same time an alleged violation of defendant's probation in case A438396 was brought to the court's attention.
In March 1977 defendant appeared in court in both matters  violation of the August 1975 probation order (A438396) and commission of two felonies with a prior felony conviction alleged (A017430). The following occurred:
Defense counsel asked the court "to consider a motion pursuant to [Penal Code section] 1192.5." The court agreed and the parties went off the record, presumably to discuss the terms of a plea bargain. Then, on the record, defendant was told that "the Court could require you to spend two years in the county jail, as a result of your pleading guilty to these two charges, coupled with the violation of probation"; that if defendant were placed on probation and "required to spend two years in the county jail, there will be other terms and conditions"; and that "the maximum punishment which [the court] will impose upon you will be *735 two years in the county jail." Defendant was also told that if after reading the probation report the judge "cannot live up to the promise that he has made to you," defendant could withdraw his guilty pleas and the case would then be set for trial.
After further waivers, defendant pleaded guilty to counts 1 and 2 in the new information (A017430) and admitted the prior conviction.
On April 21, 1977, defendant appeared for sentencing. On the new charges, defendant was sentenced to state prison and execution of sentence was suspended. The court said: "Place him on formal probation on the following terms and conditions:
"One, he serve 365 days in the county jail.
"Secondly, he obey all laws.
"All right. You're admitting the other matter as far as the violations, ...?
"[Defense Counsel]: Yes, Your Honor.
"THE COURT: That would be on case No. A 438396.
"I'll find that he is in violation and impose 365 days in the county jail to run consecutive with the other time. No parole.
"[Defense Counsel]: Credit for time served, Your Honor. I think it's 160 days.
"THE COURT: I wouldn't give him credit for time served. He's lucky he's not going to the joint, ... looking at the offenses involved." (Italics added.)
The court and defense counsel then discussed the length of defendant's probation in this case; the court decided to extend probation "so that we have at least a four-year tail on him after he gets out." Defense counsel then clarified that the court was reinstating defendant's probation in case A438396 "on the same terms and conditions on the condition that he spend 365 days in the county jail consecutive to A017430 [the new charges]." After a brief discussion concerning defendant's request to make several telephone calls, the court told defendant to straighten himself out; that he had "a lot of good years before" him. The clerk *736 asked whether probation in case A438396 was extended for four years; the court said yes; defense counsel thanked the court, and the proceedings ended. Defendant said nothing.
On May 24, 1977, the superior court denied a written petition for credit under section 2900.5 of the Penal Code. On June 3, 1977, defendant petitioned this court for "credit of presentence incarceration" in case A 017430. That petition was assigned to another division of this court which, on June 23, 1977, made an order directing the superior court to reconsider its denial of such credit in the light of People v. Hunter (1977) 68 Cal. App.3d 389 [137 Cal. Rptr. 299] and Penal Code section 2900.5 as amended. The superior court did reconsider and on September 22, 1977, made an order giving defendant credit for 106 days in case A-017430.[2]
Meanwhile, on June 6, 1977, defendant filed a notice of appeal. The record was filed in this court on June 21, 1977, and assigned to this division. The parties have properly treated the appeal to apply to both superior court cases. Nevertheless, since the only issue raised in either case is the back-time credit under section 2900.5 and the trial court's reaction to the order of June 23, 1977, mooted that issue with respect to case A-017430, we are only concerned with case A-438396  the one in which defendant already spent a year in jail as a condition of probation before the reimposition of probation in April 1977.

DISCUSSION
(1) Defendant contends that he is entitled to credit for time previously served as a condition of probation when probation was first imposed in 1975. Leaving aside whatever time defendant had to serve in case A-017430, that contention amounts to an assertion that when the court in April 1977 reimposed probation on condition that defendant serve one more year in jail, that condition was already satisfied. A literal reading of section 2900.5 as amended in 1976 indicates that defendant is correct. Subdivision (a) demands that "all days of custody ... including days served as a condition of probation ..." be credited upon any sentence; subdivision (c) defines "sentence" to include a "period of *737 imprisonment imposed as a condition of probation." One year minus one year equals zero.
Defendant's plea to two new counts, and his admissions of a prior felony conviction and of a probation violation were concededly part of a plea bargain in which defendant would receive probation rather than be sentenced to prison. He contends, however, that since the plea bargain was made after the 1976 amendment to section 2900.5 of the Penal Code, it cannot "be read as including any express condition that under the then existing law he receive no credit for time served." Further, he points out that "there was not one word spoken to indicate that as part of the bargain he was not to receive credit for time served."[3]
Up to this point, defendant is correct. The proceedings took place after the present version of section 2900.5 had been the law for some time and it may be difficult to read the record as impliedly waiving the statute's express credit for "days served as a condition of probation."[4]
Nevertheless, whatever the record may or may not indicate about the terms of the plea bargain, it convincingly demonstrates that the court intended that defendant be physically confined in jail for two years. Even if the several references in the record to "two years in the county jail, ..." and "365 days in the county jail to run consecutive with the other time," were not enough, the court's response to the request for credit  "I wouldn't give him credit for time served. He's lucky he's not going to the joint, ... looking at the offenses involved."  leaves no doubt on that score.
Moreover, it is clear that as far as the court was concerned, the condition of two years' actual custody was "the heart of the probation order; without it, the order would have been quite different or might not *738 have been forthcoming at all." (In re Gonzales (1974) 43 Cal. App.3d 616, 621 [118 Cal. Rptr. 69].)
Generally, if a plea bargain is breached or misunderstood, the most that a disappointed defendant can expect is the right to withdraw his guilty plea. (E.g., People v. Johnson (1974) 10 Cal.3d 868, 873 [112 Cal. Rptr. 556, 519 P.2d 604]; People v. Pinon (1973) 35 Cal. App.3d 120, 124-125 [110 Cal. Rptr. 406].) Defendant would contend, however, that the withholding of jail-time credits in granting probation is no more than an invalid condition of probation, which he is entitled to have struck, leaving the underlying grant of probation intact. (E.g., In re Mannino (1971) 14 Cal. App.3d 953, 956, fn. 1 [92 Cal. Rptr. 880, 45 A.L.R.3d 996].) In re Gonzales, supra, demonstrates, however, that where an invalid condition of probation is "the heart of the probation order" a proper disposition calls for something more drastic than a mere disregarding of the condition.
Defendant cannot have it both ways. If he bargained away his rights to back time credit under section 2900.5 and could legally do so, why is he here? If he did not  and we agree that on this record we cannot say that he did  the appeal has the effect of bringing an illegal sentence to our attention. The trial court attempted the impossible: to incarcerate him physically for one year in spite of the fact that section 2900.5 said it could not be done. The proper remedy is, therefore, to reverse and to remand with directions that defendant be permitted to withdraw his guilty plea. (In re Gonzales, supra, 43 Cal. App.3d 621-622.)
We fully recognize that the end result of this appeal may be a longer period of incarceration than the one which the trial court illegally intended. Nevertheless, as People v. Serrato (1973) 9 Cal.3d 753, 763-765 [109 Cal. Rptr. 65, 512 P.2d 289] demonstrates, the general rule that a defendant should not be penalized for taking an appeal does not apply "when a trial court pronounces an unauthorized sentence. Such a sentence is subject to being set aside judicially and is no bar to the imposition of a proper judgment thereafter, even though it is more severe than the original unauthorized pronouncement." (Id., 764.)[5]
*739 The judgment (order granting probation) in case number A-438396 is reversed with directions to permit defendant to withdraw his guilty plea in case number A-017430 if he elects to do so.
The appeal in case number A-017430 is dismissed as moot.
Ashby, J., concurred.
STEPHENS, J., Dissenting.
This is a very simple case. Defendant pleaded guilty to one count of robbery and one count of burglary in case No. A-017430. He was sentenced to the state prison, suspended, placed on probation conditional that he spend one year in the county jail. Back time credit of 160 days was mandated by section 2900.5 of the Penal Code.
The pleas in case No. A-017430 constituted a violation of probation in case No. A-438396. Sentence on this violation was for one year in the county jail as a condition of continuing that probation. This year jail time was to run consecutively to the year jail term imposed in case No. A-017430. Defendant had previously been incarcerated, as a condition of the original grant of probation, in case No. A-438396, one year in the county jail.
Section 19a of the Penal Code provides a maximum term of one year in a county jail "as a condition of probation upon a conviction of either a felony or a misdemeanor ... [for a single offense]." (See also People v. Brasley (1974) 41 Cal. App.3d 311 [115 Cal. Rptr. 910].) Likewise, under section 1203.1 of the Penal Code, as a condition of probation, the judge may imprison a defendant in a county jail for not more than "the maximum time fixed by laws." Section 1203.1 and section 19a, when read together, allow the imposition of only one year (total time) in the county jail on one count as a condition of probation.
*740 Defendant had, at the time probation was reinstated as to case No. A-438396, already served the maximum term permitted by law in the county jail.
As to case No. A-017430, defendant has presently served in excess of the term of incarceration and should be released.
As to case No. A-438396, the condition of the additional year in the county jail, while technically a legal "sentence," was ineffective to impose additional incarceration time. Section 2900.5 of the Penal Code provides:
"(a) In all felony and misdemeanor convictions, ... when the defendant has been in custody, ... all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, shall be credited upon his sentence, ... If the total number of days in custody exceeds the number of days of the sentence to be imposed, the entire sentence shall be deemed to have been served.
"(b) .... .... .... .... ...
"(c) For purposes of this section, `sentence' includes any fine or period of imprisonment imposed as a condition of probation.... The credits provided by this section shall not be considered in establishing or fixing any condition of probation, ...; but such credits shall be applied to any such condition of probation,... no later than one week after it has been established or fixed."
Therefore, the "sentence" (the condition of the one-year jail term) was legal. The judge was prohibited from considering any time previously served as it related to that case. The jail time previously served equalled or exceeded the imposition of conditioned incarceration, and, hence, that condition was deemed complied with.[1]
There being no jail time to be served in case No. A-438396, defendant is entitled to be released in that case.
*741 In sum, the defendant is now, and for some time past has been, entitled to his release from custody in cases numbered A-017430 and A-438396. The cases should be remanded to the trial court for appropriate disposition in accordance with the views herein expressed.[2]
On March 8, 1978, the opinion was modified to read as printed above.
NOTES
[1]  This claim is obviously false. The offense to which defendant pleaded guilty was alleged to have been committed on June 25, 1975. We gather from the probation report that in April 1975, defendant had been arrested on another burglary charge, that he eventually pleaded guilty to receiving stolen property and served 90 days in jail as a condition of probation.
[2]  We note that this court's order did not mandate the granting of credit: it merely directed the superior court to reconsider its denial in the light of People v. Hunter, supra. Therefore, to the extent that the previous order may be deemed to be law of the case, it is limited to the self-evident proposition that the rule announced in Hunter applies to this case.
[3]  This argument assumes, of course, that a defendant may, by appropriate waivers, bargain away the benefits of section 2900.5. No reported decision that has come to our attention so holds. We express no opinion on the issue. It has not been briefed by the parties and is not necessary to a proper disposition of this case, which is rapidly becoming moot. We understand that the point is presently before another division of this court.
[4]  We attach relatively little importance to the fact that defendant's attorney asked whether his client would be given credit for back time after the court had made its order. It seems highly probable that counsel was only referring to case A-017430 in connection with which defendant had apparently been in custody before the April 1977 proceedings. If we are correct, counsel was obviously not asking for credit for time served as a condition of probation.
[5]  In his dissent, Justice Stephens concludes: (1) That the combined effect of sections 19a and 1203.1 of the Penal Code prohibits county jail confinement in excess of a cumulative total of one year per felony, even if imposed as conditions to successive grants of probation; and (2) that, nevertheless, the order granting probation in case A-438396 was legal.

While the first issue may become relevant somewhere down the road, neither side has raised it in connection with this appeal, nor is its resolution necessary at this time. We therefore decline to discuss it. We merely point out that even if we agreed with the dissent on that point, we would not agree that the order was legal. As we point out in the opinion, nothing is plainer than that the court ordered one year of actual confinement, not an exercise in subtraction. Whether it was unable to achieve that objective because of section 2900.5 alone, or because of the interplay between sections 19a, 1203.1 and 2900.5, seems irrelevant.
[1]  Where a defendant has begun serving the sentence, the court has no jurisdiction to vacate or modify it unless it was improper on its face. (In re Wimbs (1966) 65 Cal.2d 490, 498 [55 Cal. Rptr. 22, 421 P.2d 70]; People v. McAllister (1940) 15 Cal.2d 519, 526 [102 P.2d 1072]; People v. Getty (1975) 50 Cal. App.3d 101, 107 [123 Cal. Rptr. 704].)
[2]  The fact that the judge intended to impose sentences which together would incarcerate defendant for two years is conceded. He could have accomplished that by requiring one year on the robbery and one year on the burglary to run consecutively (case No. A-017430) and then extend the probationary term on case No. A-438396. The judicial error contained within a legal sentence cannot be altered after commitment.
