
633 P.2d 1238 (1981)
96 N.M.App. 640
STATE of New Mexico, Plaintiff-Appellee,
v.
Richard J. CRESPIN, Defendant-Appellant.
No. 4985.
Court of Appeals of New Mexico.
September 8, 1981.
*1239 John B. Bigelow, Chief Public Defender, Michael Dickman, Asst. Appellate Defender, Santa Fe, Richard A. Winterbottom, Trial Counsel, Albuquerque, for defendant-appellant.
Jeff Bingaman, Atty. Gen., Clare E. Mancini, Asst. Atty. Gen., Santa Fe, for plaintiff-appellee.

OPINION
WOOD, Judge.
Because of violations of probation, defendant's suspended sentence was revoked. Defendant was sentenced to six months in the penitentiary. Defendant sought reconsideration of the sentence, arguing for a change in the terms of probation. The trial court denied the motion to reconsider, ruling that it lacked "jurisdiction to modify conditions of probation or extend the period of probation * * *." The trial court used "jurisdiction" in the sense of power or authority to grant the relief sought by defendant. Heckathorn v. Heckathorn, 77 N.M. 369, 423 P.2d 410 (1967). Defendant appeals. We discuss: (1) the length of probation; (2) conditions of probation; and (3) defendant's contention on appeal.

Length of Probation
Convicted on his guilty plea to commercial burglary, defendant was sentenced to eighteen months in the penitentiary. See § 31-18-15(A)(4), N.M.S.A.1978 (1980 Cum. Supp.)
The sentence was suspended and defendant was placed on probation. A special condition of probation was that defendant enter the "Plagge Alcohol Treatment Center in Las Vegas, New Mexico for the three (3) months treatment program".
The judgment also provided for a total probation period of twenty-one months. The "Order of Probation", however, provided for a probation period from January 25, 1980 to September 25, 1982. The length of the probation period, in both the judgment and the order of probation, was erroneous. The maximum period of probation was eighteen months, Laws 1981, ch. 285, § 2(D) not being applicable to this case. See State v. Gonzales, 96 N.M. 556, 632 P.2d 1194 (Ct.App.1981). Thus, the maximum length of a probation beginning January 25, 1980 was to July 25, 1981.
The judgment provided that defendant was to be given credit for presentence confinement of sixty-one days. Section 31-20-12 N.M.S.A.1978. Applying this credit, see State v. Murray, 81 N.M. 445, 468 P.2d 416 (Ct.App.1970), the maximum length of imprisonment and, thus, the maximum length of probation was reduced to sixteen months. A probation beginning January 25, 1980 would expire May 25, 1981.
Defendant violated the terms of probation by: "Leaving the PLAGGE program; *1240 failing to report to his probation officer; absconding from probation supervision." Seeking to have the court order defendant to a rehabilitation program in Albuquerque, called "New Dawn," defendant contended: "Defendant does not have to be given credit for the time between February 23, 1980, and the date of his arrest on the instant probation revocation." The record indicates that defendant left the Plagge program, without authorization, on February 23, 1980. How the other two violations of probation may or may not affect credit to be applied on defendant's probation time was not mentioned in the trial court and is not discussed on appeal. Thus, the only violation that we consider involves the Plagge program.
Although defendant left the Plagge program, without authorization on February 23, 1980, a warrant for his arrest was not issued until June 21, 1980. Defendant was arrested on August 28, 1980. An issue in the trial court was whether defendant's probation time was to be credited with the time from February 23, 1980 to August 28, 1980. Section 31-21-15(C), N.M.S.A. 1978. See State v. Murray, supra.
The trial court was concerned with the amount of remaining probation time. Defendant's position was that the time remaining did not matter because credit did not have to be given. The question of the amount of credit was avoided by the six-month penitentiary sentence, there being no contention that six months was not within the time yet to be completed. However, defendant's position, that credit did not have to be given, is incorrect. State v. Reinhart, 79 N.M. 36, 439 P.2d 554 (1968); State v. Sublett, 78 N.M. 655, 436 P.2d 515 (Ct.App.1968).
Although the length of time remaining on probation was avoided in the trial court, it is involved in the appeal by the claim that the trial court erred in ruling it could not extend the period of probation. The showing in the trial court was that New Dawn would accept defendant for ninety days to a year "[i]f you [the court] want him to stay a year, he'll stay a year." Absent a determination of the remaining probation time, we do not know whether any extension of probation would have been involved. The trial court's ruling implies that an extension of probation time would be involved. Assuming, but not deciding, that an extension would be involved, the trial court correctly ruled that it could not extend the length of the probation term; the trial court's authority as to length of probation was the authority conferred by our statutes. State v. Gonzales, supra.

Conditions of Probation
A special condition of defendant's original probation was attendance at the Plagge program for three months. Defendant left this program after approximately one month. To avoid the penitentiary sentence, defendant sought to be ordered to the New Dawn program. The trial court was not concerned with a change in where defendant was to receive his treatment and there is no suggestion that the trial court could not substitute New Dawn, for Plagge, as the place for treatment. See § 31-20-6(F), N.M.S.A. 1978. The trial court was concerned with the length of the treatment. With two months remaining on the time for the Plagge program, the trial court ruled that it lacked authority to order a New Dawn treatment program of three months to one year. The trial court ruled correctly. The New Dawn treatment program would have been an increased penalty; the trial court lacked authority to increase the penalty. State v. Castillo, 94 N.M. 352, 610 P.2d 756 (Ct.App.1980), and cases therein cited.
Implicit in defendant's trial court argument is the view that the trial court could impose new probation conditions once it was determined that defendant had violated the terms of his original probation. This view is incorrect. Section 31-20-5, N.M.S.A. 1978, authorizes the trial court to place a defendant on probation when sentence is suspended. If there are probation conditions, they are to be attached to the order suspending sentence. Section 31-20-6, supra. When a violation of probation is established, "the court may continue or revoke *1241 the probation and may require the probationer to serve the balance of the sentence imposed or any lesser sentence." Section 31-21-15(B), N.M.S.A. 1978. Under this authority, the trial court may relieve a defendant of the conditions of probation, or continue the existing conditions; however, these statutes do not authorize the trial court to change any probation condition so that the penalty is increased.

Contention on Appeal
Defendant's brief states:
This case is perverse. Advised by counsel, a probation violator wants to be given another chance: to rehabilitate himself and avoid incarceration. He is willing to extend his probation, and to live under its rule for a longer time. He is willing to add to its conditions. * * * Yet the judge believes that it cannot be done.
After imposition of a valid sentence, a court may not increase the penalty. Defendant points out that the prohibition against an increased penalty is based on the concept of double jeopardy. State v. Allen, 82 N.M. 373, 482 P.2d 237 (1971).
Defendant contends that he may waive the protections afforded by the double jeopardy concept. We assume this is correct.
The appellate brief, correctly, does not suggest that any waiver has yet occurred. Defendant's trial counsel did not proceed on the basis of a waiver. If the trial court had acceded to defendant's request, and ordered defendant to the New Dawn program, defendant would have been in a position to avoid any consequence for a violation of the New Dawn probation condition by asserting the trial court's lack of authority. This was what happened in State v. Castillo, supra. The trial court did not err in failing to give effect to a waiver that had not occurred.
Even if defendant had waived his double jeopardy protection and had agreed to an increase in the length of his probation and to an increased penalty through changed conditions of probation, the result herein would not change. The fixing of penalties is a legislative function; the trial court's authority is to impose a penalty which has been authorized by the Legislature; a penalty which has not been authorized is void. State v. Holland, 91 N.M. 386, 574 P.2d 605 (Ct.App.1978); see McCutcheon v. Cox, 71 N.M. 274, 377 P.2d 683 (1962); State v. Hovey, 87 N.M. 398, 534 P.2d 777 (Ct.App.1975). The statutes cited in this opinion have not authorized a trial court to extend the length of probation or change the conditions of probation so as to increase the penalty even if a defendant is agreeable to such changes.
The order sentencing defendant to the penitentiary for six months and the order denying defendant's motion to reconsider that sentence are affirmed.
IT IS SO ORDERED.
HERNANDEZ, C.J., and HENDLEY, J., concur.
