Any person convicted of a crime based upon an act or omission for which he or she has been acquitted or convicted in another country shall be entitled to credit for any actual time served in custody in a penal institution in that country for the crime, and for any additional time credits that would have actually been awarded had the person been incarcerated in California.
Ca. Pen. Code § 656.5