10 USC 972 - Members: effect of time lost

(a) Enlisted Members Required To Make Up Time Lost.— 
An enlisted member of an armed force who
(1) deserts;
(2) is absent from his organization, station, or duty for more than one day without proper authority, as determined by competent authority;
(3) is confined by military or civilian authorities for more than one day in connection with a trial, whether before, during, or after the trial; or
(4) is unable for more than one day, as determined by competent authority, to perform his duties because of intemperate use of drugs or alcoholic liquor, or because of disease or injury resulting from his misconduct;

is liable, after his return to full duty, to serve for a period that, when added to the period that he served before his absence from duty, amounts to the term for which he was enlisted or inducted.

(b) Officers Not Allowed Service Credit for Time Lost.— 
In the case of an officer of an armed force who after February 10, 1996
(1) deserts;
(2) is absent from his organization, station, or duty for more than one day without proper authority, as determined by competent authority;
(3) is confined by military or civilian authorities for more than one day in connection with a trial, whether before, during, or after the trial; or
(4) is unable for more than one day, as determined by competent authority, to perform his duties because of intemperate use of drugs or alcoholic liquor, or because of disease or injury resulting from his misconduct;

the period of such desertion, absence, confinement, or inability to perform duties may not be counted in computing, for any purpose other than basic pay under section 205 of title 37, the officers length of service.

(c) Waiver of Recoupment of Time Lost for Confinement.— 
The Secretary concerned shall waive liability for a period of confinement in connection with a trial under subsection (a)(3), or exclusion of a period of confinement in connection with a trial under subsection (b)(3), in a case upon the occurrence of any of the following events:
(1) For each charge
(A) the charge is dismissed before or during trial in a final disposition of the charge; or
(B) the trial results in an acquittal of the charge.
(2) For each charge resulting in a conviction in such trial
(A) the conviction is set aside in a final disposition of such charge, other than in a grant of clemency; or
(B) a judgment of acquittal or a dismissal is entered upon a reversal of the conviction on appeal.