Growing up, I hardly knew Palm Springs as anything other than "the Desert." That's what locals like my grandparents called it, as if there were only one in the world — and maybe there is. On the northern end of a string of cities that loops through southern California's Coachella Valley, Palm Springs is a place of contrasts, as prehistoric as it is modern, as much an oasis as a wasteland. Maybe it's because I was always there as a visitor (or because I could never shake the awareness that the city sits practically on the pucker of the San Andreas Fault), it has always seemed to me to be, above all else, unsettled, a place to visit or pass through rather than to stay.

Palm Springs, out Friday on Hulu, pulls sharply in the other direction: What if you were stuck in the Desert forever? In exploring this question, the movie transports Groundhog Day's eternal do-over concept from Punxsutawney to Palm Springs, and in doing so, it trades more than parkas for swim trunks. By exploiting the inherent strangeness and instability of its location, Palm Springs' off-kilter execution becomes more believable. You may have heard a version of this story before, but in this setting it becomes newly fresh, bizarre, and delightfully worthwhile.

At first, though, the film's location seems almost to be played as a punchline. Despite Palm Springs' longstanding reputation as a celebrity playground and retirement community, the region these days might be more commonly associated with an upper-class Millennial shallowness, due to the location's nearness to the annual Coachella music festival (though even Norman Mailer had recognized it back in the day as "a town built out of no other obvious motive than commercial profit"). When Nyles (Andy Samberg) becomes trapped in a time loop in which he is forced to relive his girlfriend's best friend's boho-chic desert nuptials over and over again, the location seems as much a part of his nightmare as repeatedly listening to the same bad wedding toasts. The usual rules of time loops apply here too: death and falling asleep reset Nyles' day, sending him back to the start of another morning in this supposed paradise.

Eventually, though, Nyles is joined in his time loop by the bride's black sheep sister, Sarah (Cristin Milioti); with the pair trapped together for an eternity, a witty and endearing rom-com ensues. Notably, the basic outline of the plot could have been set in any other wedding capital in the country: Nashville or Las Vegas or the Hudson Valley. But Palm Springs, as a location, turns out to be far from inconsequential.

First of all, there is the fact that Palm Springs is anything but consistent — it is geographically unstable (the movie fittingly begins with an earthquake) but also demographically in flux. In a gorgeous 2004 essay about the city for Los Angeles Magazine, author Josh Kun called the Desert "a place nobody was actually from. You don't grow up in Palm Springs, you move there." In the 2010 census, the city had a permanent population of 47,600, which balloons by another 35,000 when you account for the people who just live there part time. Additionally, as many as three million tourists pass through the Coachella Valley annually. It's a place to visit, or have a second home, or to retire to — over 62 percent of its residents come from somewhere other than the state of California — but there is an inherent absurdity to getting stuck there indefinitely.

As much as Palm Springs is a rom-com, it's also sci-fi; we're dealing with glowing caves and time loops, after all. But aside from a few enthusiastic touches of CGI, the filmmakers otherwise let Palm Springs play itself. "The overall effect" of the city of Palm Springs to begin with "is like passing through a time warp and touching down in a colony left over from the 1950s," explained a Travel and Leisure feature from 2016, which also quoted a weekender who described the place as being basically "Mars." Others have also picked up on the otherworldliness of Palm Springs, whether by finding it extraterrestrial — it's the site of many famous UFO sightings — or prehistoric. As Kun writes in his essay, "I knew that dinosaurs were extinct, but in Palm Springs they were still around, secret living fossils blending in with the heat," words maybe interpreted quite literally at one point by Palm Springs screenwriter Andy Siara.

For his part, Siara has also emphasized the necessity of the location to his story. "Siara says he couldn't have envisioned centering the film's metaphysical loopiness anywhere else but the desert," writes Palm Springs Life, which goes on to quote the screenwriter as rhapsodizing that the terrain "has a magical quality that's hard to describe." It's true that there is wiggle room in the reality here; you're never quite sure if what you're seeing is the product of the characters' drug trips, or just another trick of Palm Springs.

Somewhat ironically, "not a single frame" of Palm Springs was actually shot in the Desert; the crew ultimately worked largely in suburbs north of Los Angeles ("we couldn't afford to put an entire crew up in Palm Springs" Samberg explained to Datebook). But that only serves to show how indispensable Palm Springs is as a place; it isn't so much a physical location as it is a state of mind. Of course a portal into a time box would open up there; it'd have been a logical fallacy to put it, say, in Palmdale. On top of the inherent comedic ridiculousness of spending forever in a place most people exhaust in a weekend, Palm Springs' deranged plot wouldn't have made sense set anywhere else.

The most befuddling part of Palm Springs for some viewers will be its final shot, which contains a wink by the filmmakers suggesting that the zany sci-fi magic wasn't limited to a drug trip or parallel universe. But for those who are familiar with the Desert, it reads almost more like an in-joke. It doesn't take spending an eternity in Palm Springs to recognize: This could only happen here.