No new act of the General Assembly shall be construed to repeal a former law, as to any offense committed against the former law, or as to any act done, any penalty, forfeiture, or punishment incurred, or any right accrued, or claim arising under the former law, or in any way whatever to affect any such offense or act so committed or done, or any penalty, forfeiture, or punishment so incurred, or any right accrued, or claim arising before the new act of the General Assembly takes effect; except that the proceedings thereafter held shall conform, so far as practicable, to the laws in force at the time of such proceedings; and if any penalty, forfeiture, or punishment be mitigated by any provision of the new act of the General Assembly, such provision may, with the consent of the party affected, be applied to any judgment pronounced after the new act of the General Assembly takes effect.
Va. Code § 1-239