Pursuant to 18 U.S.C. 3585(b), a district court may not apply credit for prior time in custody at sentencing. See also, United States v. Wilson, 503 U.S. 329 (1992). Crediting prior custody time to sentencing remains the exclusive authority of the Attorney General through the Bureau of Prisons. The Applicable Bureau of Prison's policy is http://www.bop.gov/policy/progstat/5880_028.pdf [Policy 5880.28 Sentence Computation Manual (CCCA of 1984) CHAPTER I--SENTENCING REFORM ACT OF 1984, 3. COMPUTATION OF SENTENCE c. Prior Custody Time Credit]. However, please note that upon exhausting all applicable administrative remedies, a defendant may seek judicial relief (see 18 U.S.C. 2241).
The statute granting the Attorney General this authority, 18 U.S.C 3538(b), provides in pertinent part that "A defendant shall be given credit toward the service of a term of imprisonment for any time he has spent in official detention prior to the date the sentence commences-- (1) as a result of the offense for which the sentence was imposed; or
(2) as a result of any other charge for which the defendant was arrested after the commission of the offense for which the sentence was imposed; that has not been credited against another sentence."
In determining whether a defendant can receive credit for time spent in state or immigration custody, careful analysis must be given as to whether the prior custody time can be categorized as Qualified non-federal presentence time or Official Detention. Credit is not applied until commencement of sentence, after which time the administrative remedies should be pursued.