Sometimes a work's soundtrack is composed of popular songs chosen from a different era than the film's setting. This can apply to either diegetic music (the characters in the work can hear the music) or non-diegetic music (they're part of the soundtrack, but the characters can't hear them).
There are two basic variations:
- Music older than the setting. This may be used to illustrate that the main character is old, or out of touch with pop culture, or for nostalgia values.
- Music more modern than its setting. This is an impossible, paradox situation, a deliberate Anachronism Stew, as the music did not exist yet when the work is set. Can be explained by Time Travel or by pure Artistic License.
Can also be done for Rule of Cool. Note that this specifically references when the film's soundtrack is from a different time than when the film is set not from when the film is made. A Period Piece does not count if it uses period-accurate music, like Rock of Ages. Sometimes the movie doesn't even attempt to justify why they're doing this. Typically this does not apply to classical music, which is always going to be older than the time in which a work is set. A staple of Class Reunion movies, with the soundtrack being selected from the era in which the protagonists went to high school, not the time they're living in 10+ years later.
New Setting, Old Music
- Guardians of the Galaxy and its sequel are set in the same years in which they were made, but all of the songs therein are from the 60's, 70's and 80's. Peter Quill was raised on these songs by his late mother, and when he was the subject of an Alien Abduction all he had with him was one cassette she had made for him with those songs on it. He later acquires a second cassette and eventually an MP 3 player, but the songs are still from the same era.
- Central Intelligence is about two guys who went to high school in the 90's reconnecting over a CIA mission just before their Class Reunion, and the songs are all pulled from the 1990's.
- Grosse Pointe Blank has an all 80's soundtrack as one of its leads, a DJ, declares that the town's station will be adhering to an "All 80's, all vinyl" format in honor of the upcoming reunion.
- American Reunion is littered heavily with songs from the late 90's, many of them were on the original movie's soundtrack.
- The Big Chill is about a group of friends reuniting after one of their high school friends killed himself. They gather and stay at one of the friend's old houses and reflect over their lives and that of their late friend set to the sounds of the 1960's songs they all grew up enjoying.
- The Sting featured the ragtime standard "The Entertainer" by Scott Joplin in its credits sequence. Many viewers were under the impression that this was a period-appropriate piece of music for the film's 1936 setting, but the piece was actually composed in 1902.
- Spider-Man: Homecoming has an 80s theme for the Homecoming dance so many of the songs in the soundtrack, including a webswinging montage having nothing to do with the dance, are 80s tunes.
- Lilo & Stitch uses mostly old Elvis Presley songs in its soundtrack, despite taking place in the present day. This was done to highlight Lilo's eccentricities; a girl her age would be listening to contemporary pop, instead of songs from almost fifty years earlier. It's also implied to be a connection to her late parents.
Old Setting, New Music
- Moulin Rouge! draws its music from songs that came much later than its 1900 setting.
- Zig-zagged in The Great Gatsby, which is set in The Roaring '20s. While some scenes are set to modern hip-hop music, some of the songs are also sung in a style consistent with 1920s jazz.
- A Knight's Tale: 14th century knights rocking out to the music of the 70s, including Queen and David Bowie.
- The Peter Pan prequel Pan takes place sometime in the Victorian era, yet the Lost Boys are singing "Smells Like Teen Spirit" in one sequence.
- Schindler's List uses in its soundtrack the 1967 song "Jerusalem of Gold".
- Inglorious Basterds set during WWII, features "Cat People (Putting Out Fire)" by David Bowie from 1982.
- The Greatest Showman is set in the 19th century but the songs is done with contemporary pop and hip-hop to illustrate how ahead of his time PT Barnum was.
- Westworld: In-universe, eponymous Wild West amusement park has a piano tavern play more modern songs such as "Paint it Black".
- American Gods uses anachronistic music in some of its historical "Coming to America" segments to set the right tone. For instance, Anansi's speech to an 18th-century slave ship is set to chaotic jazz, and Essie MacGowan's tale of crime and sexual misadventure is accompanied by various 1950's doo-wop songs.
- Stranger Things is usually all about keeping things period-appropriate to the setting (it starts in 1983), and this is particularly accurate with the music. However, they goofed in one scene by mere weeks: the Season 1 episode "The Monster", set in November 1983, has some of the teenagers listening to Corey Hart's "Sunglasses at Night" in a car—released on January 21, 1984.
- Almost all of the soundtrack for Peaky Blinders is anachronistic: the series is set in the 1920s, but the soundtrack is almost all post-1980 rock. The series' theme is Nick Cave's "Red Right Hand."
- Reign, set in the 1500s, occasionally likes to use instrumental covers of popular 2010s songs, usually for dancing scenes. The ballroom music playing in the background of 2x13 is an instrumental version of "Chandelier" by Sia, Lola's Wedding Dance is to an instrumental of Lorde's "Royals", and at one point Greer and Leith dance to an instrumental of The Lumineers's "Stubborn Love".
- Bioshock Infinite features covers of several songs written long after the game takes place (1912). It later turns out that they were plagiarized from alternate timelines.
- Koei's Musou Warriors franchise is very fond of this: Dynasty Warriors, which is set in the Three Kingdoms era (188-280 AD), has rock music with a mix of traditional Chinese music. Samurai Warriors, which is set in the Sengoku Period, has techno music with a combination of traditional Japanese music.
- 1944: The Loop Master features suspiciously similar versions of rock songs that wouldn't be written for another 20-30 years.