Article 39 Only a law may designate which acts constitute a crime and what penalties, or other detriments to rights or property, may be imposed for committing them. Article 40 (1) Only a court may decide on guilt and on the punishment for criminal offences. (...) (6) The question whether an act is punishable or not shall be considered, and penalties shall be imposed, in accordance with the law in effect at the time the act was committed. A subsequent law shall be applied if it is more favorable for the offender.
Article 49 - Principles of legality and proportionality of criminal offences and penalties