
72 Cal.App.3d 657 (1977)
138 Cal. Rptr. 400
In re HERMAN LEE HANDSOME on Habeas Corpus. In re CLARENCE RAYMOND BEEBE on Habeas Corpus. In re ROOSEVELT WEBB on Habeas Corpus.
Docket Nos. 77-109, 77-131, 77-238.
Court of Appeals of California, Second District, Division Five.
August 11, 1977.
*658 COUNSEL
Paul Halvonik, State Public Defender, under appointment by the Court of Appeal, Charles M. Sevilla, Chief Assistant State Public Defender, and Allison B. Stein, Deputy State Public Defender, for Petitioners.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, James *659 H. Kline and Donald F. Roeschke, Deputy Attorneys General, for Respondent.
OPINION
KAUS, P.J.
Each petitioner in these consolidated matters pleaded guilty to a felony pursuant to a plea bargain and was placed on probation on condition that he serve a year in county jail. Each thereafter filed a request seeking credit for presentencing jailtime. We treated these requests, however captioned, as petitions for writs of habeas corpus, requested responses from the Attorney General, received additional briefing from the state public defender and consolidated them for hearing.
We conclude that relief must be denied because petitioners, who attack arguably improper plea bargains, do not ask, as a condition of relief, that the bargains be rescinded.

FACTS
1) Roosevelt Webb (A-328461, 2 Crim. Ext. 77-238), charged with assault to commit robbery, with two prior convictions alleged, pleaded guilty to that charge, but no finding was made with respect to the prior convictions. On January 5, 1977, Webb was sentenced to prison; imposition of sentence was suspended and he was placed on five years' probation on condition that he serve one year in county jail, with no "parole and no credit for time previously served in custody awaiting this trial." Webb was in custody from July 12, 1976, to January 5, 1977.
2) Clarence Raymond Beebe (A-330718; 2 Crim. Ext. 77-131), charged with robbery, with seven prior convictions alleged, pleaded guilty to second degree robbery. On January 5, 1977, Beebe was sentenced to prison; imposition of sentence was stayed and he was placed on three years' probation on condition that he spend one year in jail with "no credit to be given for time served," and no eligibility for county parole.[1] Beebe was in custody from October 17, 1976, to January 5, 1977.
*660 3) Herman Lee Handsome (A-187752; 2 Crim. Ext. 77-109), charged with robbery and using a firearm, pleaded guilty to second degree robbery on June 10, 1975. On November 9, 1976, imposition of sentence was suspended and Handsome was placed on three years' probation on condition that he serve a year in jail. Under the terms of his probation, he was entitled to good time and work credits but not parole. No mention was made about credit for time served. Handsome had been in custody from January 11, 1975, to April 3, 1975, and then, having been released on bail and having failed to appear in court, from October 20, 1976, to November 9, 1976.

DISCUSSION

I
Penal Code section 2900.5, effective January 1, 1977, and applicable to all cases not yet final on that date (People v. Hunter (1977) 68 Cal. App.3d 389, 393 [137 Cal. Rptr. 299]), provides that all days of pretrial custody shall be credited on the defendant's sentence, which includes any "period of imprisonment imposed as a condition of probation...."
The public defender contends, on behalf of Beebe and Webb, sentenced after the amended section took effect, that a plea bargain may not encompass a waiver of time credits otherwise due under section 2900.5 and that even if such a waiver is permissible, the sentencing proceedings do not reflect a knowing waiver. We can assume  but make clear that we do not so hold  first, that a defendant may not be required to waive credits as part of a plea bargain, and second, that even if a defendant may so waive, these petitioners did not knowingly do so.
(1) The fact remains that both Beebe and Webb obtained the benefit of the plea bargains  pleading to less than was charged or alleged and no prison  and cannot demand credit for time served while retaining the other benefits of the plea bargain. Since neither desires to rescind his plea bargain and stand trial on the informations filed against them, their petitions must be denied. (Cf. People v. Kaanehe (1977) 19 Cal.3d 1, 13-15 [136 Cal. Rptr. 409, 559 P.2d 1028]; People v. Johnson (1974) 10 Cal.3d 868, 873 [112 Cal. Rptr. 556, 519 P.2d 604]; People v. Kirkpatrick (1972) 7 Cal.3d 480, 487 [102 Cal. Rptr. 744, 498 P.2d 992]; In re Sutherland (1972) 6 Cal.3d 666, 672 [100 Cal. Rptr. 129, 493 P.2d 857]; In re Gannon (1972) 26 Cal. App.3d 731, 738-739 [103 Cal. Rptr. 224].)


*661 II
(2) Handsome's petition raises a different issue. As noted, he pleaded guilty in June 1975. As announced in open court, the plea bargain was that he would be placed on probation and that, as a condition of probation, he would spend "up to a year in the county jail." The case was continued for sentence to July 8. Because Handsome jumped bail, sentencing did not take place until November 9, 1976.
It is plain that if the sentencing had taken place when scheduled, Handsome would have served his year in jail before the 1976 amendment to section 2900.5 had been approved by the Governor, let alone become effective.
Claiming that this consideration is immaterial, the public defender relies on In re Fink (1967) 67 Cal.2d 692 [63 Cal. Rptr. 369, 433 P.2d 161], in which the defendant pleaded guilty to a violation of former Penal Code section 4531, absconded, and after being recaptured was sentenced to prison. While the defendant was at large, the Legislature repealed section 4531 and amended section 4530 to provide for a lesser penalty for the crime of which he was convicted; the defendant claimed he was entitled to be punished under the new law. (67 Cal.2d at p. 693.) In rejecting the People's contention that the defendant's own wrongful acts extended the pending prosecution past the effective date of the new law, the court concluded that the "controlling consideration is not that petitioner may receive a lesser sentence due to his second escape but that he suffer the punishment deemed appropriate by the Legislature, no more and no less." (67 Cal.2d at p. 694.)
In re Fink is not in point. There the defendant was sentenced to the term which the Legislature deemed appropriate. Handsome was sentenced to a lesser term, agreed on in the plea bargain. The only difference between his case and the two others before us is that in July 1975, for obvious reasons, no one bothered to verbalize a term of the bargain  no credit for time served  which the law then implied: the credit provisions of section 2900.5 before its 1976 amendment did not apply to persons sentenced to county jail as a condition of felony probation. (People v. Brasley (1974) 41 Cal. App.3d 311, 317 [115 Cal. Rptr. 910].) Handsome's 1975 bargain must therefore be read as including an express condition that he receive no credit. Thus seen, his case is no different than Webb's or Beebe's: since he does not express any desire to rescind his plea bargain and stand trial so that, if convicted, *662 he could be sentenced to the term "deemed appropriate by the Legislature, no more and no less," his petition has no merit.
Each of the three consolidated petitions is denied.
Stephens, J., and Ashby, J., concurred.
NOTES
[1]  Contrary to Beebe's contention, we think it is clear that the "no credit" condition was part of the plea bargain and not a "gratuitous embellishment."
