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.
Ca. Pen. Code § 793.5