Unfortunately lawyers at least in Russia would have an opinion here.
Let's suppose that you posted something publicly to an append-only social network, and it was completely OK at that time. Then, laws changed (and you could not predict this), and this post is no longer legal according to the new rules. What the lawyers say is that the very fact that the message is still online is now a crime. Yes, there is a universal notion that laws do not apply backwards in time (retroactively), but here they indeed don't: the message is still online AFTER the law got into existence, and so this is a lasting crime that started when the law was enacted.
Normally you would be required to delete the post between the moments when the new law is announced and enacted, but you can't, and it is still yours for others to find and read, so you go to jail.
P.S. It would be interesting to know the opinion of lawyers from other countries.
Let's suppose that you posted something publicly to an append-only social network, and it was completely OK at that time. Then, laws changed (and you could not predict this), and this post is no longer legal according to the new rules. What the lawyers say is that the very fact that the message is still online is now a crime. Yes, there is a universal notion that laws do not apply backwards in time (retroactively), but here they indeed don't: the message is still online AFTER the law got into existence, and so this is a lasting crime that started when the law was enacted.
Normally you would be required to delete the post between the moments when the new law is announced and enacted, but you can't, and it is still yours for others to find and read, so you go to jail.
P.S. It would be interesting to know the opinion of lawyers from other countries.