Due to changes in technologies, many answers were outdated. However, these answers were very good for the past, and they might also be useful for the same cases, but not for most. An example is a depreciated MySQL extension that was replaced with MySQLi, and the older PHP date time function whose use should be replaced by the newer (PHP date time class).
I am putting myself in a scenario: I do all my best to answer a question, my answer will be accepted and upvoted, but after one year, someone might write a comment and say:
This is a bad answer, outdated.
This is ethically right, notifying about an outdated answer is not a bad thing, but I am sure we can do this in another way, that does not destruct the person, considering that the answer was good in the past. My aim in this discussion is: What is the best etiquette for doing that? Is there any systematic procedure to be taken for improving the quality of answers?
Another issue here is someone that is searching for an answer. In case that we post an updated answer to the question, it might not get any upvotes, and then the user will probably chose the one with a high number of upvotes (considering that it's peer reviewed).