Excuse me, a criminal was sentenced for allowing others to take drugs, and was forced to give up drugs in a drug rehabilitation center before serving his sentence. How to calculate the time?

After being sentenced for allowing others to take drugs, the time of compulsory detoxification in the drug rehabilitation center before serving the sentence is not included in the time served.

Article 47 of the Criminal Law of People's Republic of China (PRC) shall be counted from the date of execution of the judgment. If a person is detained before the execution of the judgment, one day of detention shall be reduced to one day of imprisonment.