The Architect says that the current version into which Neo is born is the sixth version. We also learn that the first Matrix (the one Agent Smith told Morpheus about while torturing him) was designed to be a utopia, which failed, and then the second version, while more real, was also rejected by the pod-humans. The third version of the Matrix incorporated the changes suggested by the intelligence we know as the Oracle, where 99.5% of the population would accept the program because they were given a subconscious level of choice to do so. The fundamental flaw is that those .5% that don't accept the program would "wake up", and either have to be put down or escape to strengthen the rebels in Zion. That .5%, by working within the Matrix, would eventually cause the entire Matrix to crash by showing people they were living in a dream world. So, a second level of control was created where Zion itself was created, allowed to grow, then wiped out with the coming of the One, who would "reboot" the entire system, both the Matrix and Zion, in the process allowing the machines and the One to "tweak" the Matrix environment to make it more realistic, and the control systems more effective. Four such iterations have occurred as of Neo's waking up, to make Neo's world the sixth version.
If we accept a roughly 100-year cycle time, as seen with the current version, then the Matrix has run in its current state of affairs (versions 3-6) for roughly 400 years. We could probably add another 20-30 years of the humans being aware they were hooked up but unable to do anything about it, while the machines developed the Matrix and through its first two versions. Thus, the Matrix has probably been running for approximately 420-450 years, meaning the true year is somewhere in the 25th century, not the 21st as Matrix residents believe, or the 22nd as the rebels think.
Understand that the Matrix can be anything the machines need it to be. So, the entire past history of civilization, including new things we discover daily, is according to the movies simply data injected by the machines. The first day of each new Matrix version is somewhere in the late 90s, and everyone simply "wakes up" into this neural network where certain people are recognized as relatives or friends, and others are complete fabrications needed to replace people we think are real but who simply do not have a flesh-and-bone body in a pod.