GENERAL PROVISIONS
CHAPTER II
VALIDITY OF A CRIMINAL LAW
Article 3. Term of Validity of a Criminal Law
1. The criminality of an act and punishability of a person shall be determined by a criminal law in force at the time of the commission of that act. The time of the commission of a criminal act shall be the time of an act (or omission) or the time of occurrence of the consequences provided for by the criminal law, where the occurrence of those consequences was desired at a different time.
2. A criminal law nullifying the criminality of an act, commuting a penalty or in otherwise mitigating legal circumstances for the person who committed the criminal act shall have a retroactive effect, i.e., it shall apply to the persons who committed the criminal act prior to the coming into force of such a law, also to the persons serving a sentence and those with previous convictions.
3. A criminal law establishing the criminality of an act, imposing a more severe penalty upon or otherwise aggravating legal circumstances of the person who has committed the criminal act shall have no retroactive effect. The provisions of this Code establishing liability for genocide (Article 99), treatment of persons prohibited under international law (Article 100), killing of persons protected under international humanitarian law (Article 101), deportation of the civil population of an occupied state (Article 102), causing bodily harm to, torture or other inhuman treatment of persons protected under international humanitarian law (Article 103), forcible use of civilians or prisoners of war in the armed forces of the enemy (Article 105) and prohibited military attack (Article 111) shall constitute an exception.
4. Only the penal or reformative sanctions as well as medical treatment measures provided for by a criminal law in force at the time of passing of a court judgement shall be imposed.
EDIT.