TMZ has learned Charlie Sheen's actual "jail" sentence will last only seconds.
TMZ broke the story ... under the plea deal just approved by the court, Charlie will get a 30-day sentence which will be "administered and executed" at Promises rehab facility in Malibu -- where Charlie stayed either full or part-time for more than a month earlier this year.
Sources connected with the case tell TMZ that Charlie will receive credit for "time served" ... translation, we're told Charlie will check into Promises on August 23 and immediately leave.
And it gets even better for Sheen -- he's already completed his 36 hours of anger management, another element of the plea deal.
The plea bargain is a victory for Yale Galanter, who shockingly represents the alleged victim in the case -- Brooke Mueller. Galanter ended up negotiating the plea with the Pitkin County DA.