When Does the Film "The Avengers: Age of Ultron" (2015) Take Place?
"The Avengers: Age of Ultron" is a superhero film written by Joss Whedon [adapting "The Avengers" #55 & #57 v1 (1968) by Roy Thomas as well as "The Avengers" #19-#22 v3 (1999) by Kurt Busiek] that released April 22nd, 2015. So when is "Age of Ultron" set?
We know this because in the film "Captain America: Civil War" (2016), during a scene which takes place in April of 2016 AD, Colonel Helmut Zemo whispers, "I've thought about nothing else for over a year." and Captain America/Steve Rogers replies, "You're Sokovian?" referring to the fictional country at the heart of this story and its aftermath.
It takes place on the fictional Marvel Cinematic Universe timeline in the year:
2015 AD
We know this because in the film "Captain America: Civil War" (2016), during a scene which takes place in April of 2016 AD, Colonel Helmut Zemo whispers, "I've thought about nothing else for over a year." and Captain America/Steve Rogers replies, "You're Sokovian?" referring to the fictional country at the heart of this story and its aftermath.
2016 - 1 = 2015.
Furthermore, in "Captain America: Civil War" (2016) Iron Man/Tony Stark opines, "He decided to spend his summer" when referring to an event in this movie. That strongly implies this story is in the previous summer to the then-current spring: the summer of 2015 AD.
It must take place before the events of "Captain America: Civil War" (2016) in early 2016 AD and after the events of "Captain America: The Winter Soldier" (2014) in late 2013 AD.
In season 2 episode 20 "Scars" (2015), Agent Phil Coulson's statement "What's transpired over the last week is a lot to take in." tells us it has been one week since the intelligence was acquired in season 2 episode 19 "The Dirty Half Dozen" (2015) that sent the Avengers on their mission depicted in the opening scene of the film. Therefore the main action only covers less than a week in the summertime and it's all contained within the 2015 AD calendar year.
This Geekritique article and video examines its exact setting.
It is a chronologically midway film in the Marvel Cinematic Universe timeline and can be watched either at its timeline point or before “The Avengers: Infinity War” (2018) as an extended flashback.