This has been a long-standing controversy in DW fandom. At the time they came out, the UNIT stories in both the Third and Fourth Doctor's eras were assumed to take place in that nebulous "near future" that a lot of SF productions are set in, close enough that they can use contemporary fashions and cars and props and such, but with new technologies and sci-fi trappings added. For instance, in the Third Doctor's era you had Britain sending expeditions to the Moon and Mars, you had various technologies beyond what Earth had in the '70s like advanced robots and computers and time-travel experiments, etc. So it was always assumed to be a few years ahead, which is why Sarah gave that 1980 date in "Pyramids of Mars."

However, a few years later, when they brought back the Brigadier in "Mawdryn Undead" in the Fifth Doctor era, the producers of that time had forgotten about the UNIT dating policy of the past, and claimed that the Brigadier had retired from UNIT in 1977, putting the UNIT stories in roughly real time and creating a contradiction. And it's never been satisfactorily resolved. I think the modern shows and tie-ins are generally agnostic on the UNIT timeframe.

As for the new series, usually in the Russell T. Davies era, the stories set on Earth were consistently set one year in the future of real time -- starting with "Aliens of London," which came out in 2005 and was set in 2006. I think that Moffat-era "present-day" stories have generally been set in the same year they came out, though.

__________________Christopher L. Bennett Homepage -- Site update 11/16/14 including annotations for "The Caress of a Butterfly's Wing" and overview for DTI: The Collectors