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 both set in 2014, but all of the songs therein are from the '60s and '70s. 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 MP3 player, but the songs are still from the same era.
- Central Intelligence is about two guys who went to high school in the '90s reconnecting over a CIA mission just before their Class Reunion, and the songs are all pulled from the 1990s.
- Grosse Pointe Blank has an all-'80s soundtrack as one of its leads, a DJ, declares that the town's station will be adhering to an "All '80s, all vinyl" format in honor of the upcoming reunion.
- American Reunion is littered heavily with songs from the late '90s, 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 friends' old house and reflect over their lives and that of their late friend set to the sounds of the 1960s 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 web-swinging 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 (2013), 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 are done with contemporary pop and hip-hop to illustrate how ahead of his time PT Barnum was.
- British Sea Power's soundtrack for the 1934 Irish "fictional documentary" Man of Aran is essentially modern in style and form, despite the low-tech nature of the community depicted.
- Westworld: In-universe, the 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. Season 2's "Madmax" uses Oingo Boingo's "Just Another Day" in a scene set in October 1984, a song that wouldn't be recorded or released until next October (although this example is used non-diagetically). More deliberately, the climax of the final episode of Season 1 as Eleven performs a Heroic Sacrifice, Hopper and Joyce frantically try to revive Will and Hopper flashes back to the death of his daughter is non-diagetically set to Moby's "When It's Cold I'd Like To Die", a song that wouldn't be released until March 1995 — just over eleven years after the events of the episode.
- 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".
- Harlots is set in 18th century London but often has rock music in the background.
- Jesus Christ Superstar: tells the New Testament using the music, style, and aesthetic of a 1970s musical.
- The musical Hamilton is set during the late 1700s and early 1800s, yet the soundtrack is mostly comprised of rap, hip-hop, R&B and the like.
- Westeros: An American Musical is retelling A Song of Ice and Fire, which is a pseudo-medieval fantasy story, with parodies of songs from Hamilton, resulting in music that is just as out of place at it was in its original context.
- 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.
- The Thief series has a roughly late-medieval setting, but features mostly atmospheric ambient music and sounds throughout most gameplay. Religious buildings tend to have ambients that are variations on choir-like vocals, depending on the faction. The main intro and outro themes are an outright blend of drum and bass and rock music. The credits song for Thief II: The Metal Age, by German band Subway to Sally, mixes modern metal with some medieval period instruments, and the results are oddly awesome. All the music in the Thief games is in line with their overall anachronistic nature, featuring an archaic setting with the beginnings of an industrial revolution, and a focus on the criminal underworld (including the master thief protagonist, who often has to evade both the law and his own fellow criminals).
- Mafia II is mostly set in 1951 while featuring songs from across the entire decade, and some even from the '60s. The 1940s segments fare a little better.