This is a major issue. Just last week I had a student make an untrue claim about how something works based on a top ranking Stackoverflow answer. It turns out that the answer is from 2008, and was true back then, but has not been for something like 5 years already.
Stackoverflow badly needs a system for people (moderators?) to be able to 'obsolete' answers, possibly mark them with a highly visible "valid only up to version x.y of 2010" tag or something.