Not so.
The law changes and you cannot be expected to act upon the basis of legislation that does not yet exist, especially many years or decades into the future. The general principle of English law is that it cannot act retrospectively.
.
not quite true unfortunately.
"Consider the famous House of Lords case of R v R (1994). This concerned a man who raped his wife, and based his defence on the fact that for a man to rape his wife was not, in fact, illegal. It may be condemned, it may even be wicked, but it was not - at that time - illegal. If a man had approach a solicitor in 1990 and said 'Look, I'm thinking of raping my wife, is that illegal?' a competent solicitor may well have said: 'Well, of course I wouldn't condone it, but the balance of authority is that it isn't actually illegal'. He could have cited authorities going back to the 16th century to back this up. At this time, there was increasing pressure on Parliament and the courts to overturn this unedifying principle of law, but when R was heard, no action had been taken.
To cut a long story short, the House of Lords decided that marital rape was illegal, reversing a 400-year tradition. Everyone, with the exception of the defendant, heaved a sigh of relief. Later that year, the decision was put on a statutory basis, which appeared to settle the matter once and for all. The fly in the ointment is our old friend retrospectivity. The decision in R was not that marital rape was illegal, but that it had always been illegal. Again, the court had no power to decide otherwise. And this means that an octogenarian who raped his wife in the 1940's could now be prosecuted. You may feel that this is a just conclusion; you may feel that rapists should get their just deserts. However, the fact remains that we would be punishing a person for something which was not illegal at the time, and which he would have no way of knowing was ever going to be illegal. The social conditions of the time may not even have led our hypothetical defendant to think he was doing anything wrong. But he could still be prosecuted. This may sound far-fetched, but in fact within a year of the decision in R, cases were being heard in the European Court of Human Rights (ECHR). SW v United Kingdom (1995) concerned a man who was prosecuted in 1994 for a rape he had allegedly committed in 1990. If was far from obvious that marital rape was illegal in 1990. The ECHR upheld the criminal conviction, on the basis that when the rapes occurred, the defendants could have reasonably foreseen that the criminalisation of martial rape was likely. The problem with the decision in SW v UK is that it suggests that a person must govern his behaviour, not by what the law is, but by what he predicts it will be when any consequent prosecution is bought. So, not only is ignorance of the law no defence, but ignorance of the future development of the law is also no defence! None of the forgoing is intended to condone the practice of marital rape. Judicial retrospectivity presents the same kind of problem for any criminal offence, of any severity"