[1, 2] In North Carolina credit is given for time served under a previous sentence for the same conduct, but a defendant is not entitled to credit for time spent in custody awaiting trial. State v. Virgil, 276 N.C. 217, 172 S.E. 2d 281 (1970). Until the date of his commitment on or about 21 April 1970, following certification to Durham Superior Court of the decision of the Court of Appeals filed 1 April 1970 and reported in 7 N.C. App. 548, 172 S.E. 2d 881, defendant’s status was that of a person under indictment awaiting trial in default of bond and not that of a prisoner serving a sentence. “During this period, while in custody in default of bond, defendant was not serving a sentence as punishment for the conduct charged in the bill of indictment.” State v. Weaver, 264 N.C. 681, 142 S.E. 2d 633 (1965).
 The sixty days defendant spent in Cherry Hospital under observation was ordered before any trial had been held for the purpose of determining whether defendant was mentally competent to plead to the indictment and to assist counsel in the conduct of his defense. This order was for the protection of defendant’s rights and was properly regarded by the Court of Appeals as time spent in custody awaiting trial. In no sense did it constitute service of a sentence because no trial had been conducted and no sentence pronounced.
In addition to Virgil and Weaver, heretofore cited, the following authorities are in accord with the views above expressed: Williams v. State, 269 N.C. 301, 152 S.E. 2d 111 (1967); State v. *406 Foster, 271 N.C. 727, 157 S.E. 2d 542 (1967); State v. Paige, 272 N.C. 417, 158 S.E. 2d 522 (1968); State v. Stafford, 274 N.C. 519, 164 S.E. 2d 371 (1968); North Carolina v. Pearce, 395 U.S. 711, 23 L.Ed. 2d 656, 89 S.Ct. 2072 (1969). See Annotation, 35 A.L.R. 2d 1283.
Defendant contends, however, that by virtue of G.S. 15-186.1 he is entitled to credit for time spent in custody (November 20, 1968 to February 4, 1969) pending appeal of his felony conviction to the Court of Appeals.
 Chapters 266 and 888 of the 1969 Session Laws (codified as G.S. 15-186.1) were ratified, respectively, on April 22, 1969, and June 16, 1969. Defendant’s last day in custody “in lieu of bond pending appeal” was February 4, 1969. Thus these enactments designed to give credit on a prison sentence for all time spent in custody pending appeal afford defendant no relief because (1) they are not retroactive and (2) they are by their language not applicable to this case in that defendant’s sentence of imprisonment was reversed rather than affirmed by the Court of Appeals, 4 N.C. App. 478, 167 S.E. 2d 18. Hence, G.S. 15-186.1 does not apply.
 Defendant is entitled to credit for time served on the three to six months sentence following commitment (said to be twenty-nine days) and nothing more. All other time in dispute was simply time spent in custody in lieu of bond awaiting trial, or time spent in custody in lieu of bond pending appeal for which credit is not authorized by G.S. 15-186.1.
The following language appears in State v. Weaver, supra: “From the pronouncement of judgment . . . until said judgment was vacated ... defendant’s de facto status was that of a prisoner serving a sentence.” This language is entirely consistent with the views expressed here because Weaver was commited to State’s Prison to serve his sentence on May 9, 1963 — the same day on which judgment was pronounced. Thus he was serving his sentence and was neither in custody in lieu of bond awaiting trial nor in custody in lieu of bond pending appeal. Not so here. In this case defendant simply failed to make bond and obtain his release pending appeal of his felony conviction. As a result he remained in Durham County Jail from November 20, 1968, to February 4, 1969, when bail was posted and defendant was released. His release on bond at that time took place nearly three months prior to reversal of his felony conviction by the *407Court of Appeals on 30 April 1969. These facts conclusively show that defendant was in custody in default of bail pending appeal rather than in custody serving the felony sentence.
For the reasons stated, the decision of the Court of Appeals is