John Oliver (Martin Crook/Comedy Central)

John Oliver has won the Comedy Central lottery by being picked to fill in for Jon Stewart on “The Daily Show” for two months this summer. That’s because Stewart will head off to direct his first feature film, “Rosewater.”

That flick, Comedy Central said in Tuesday’s announcement, details the real-life 118-day imprisonment of journalist Maziar Bahari, who was charged by the Iranian government with spying shortly after being interviewed in 2009 by “Daily Show” correspondent Jason Jones, who traveled to Iran to file a series of reports for the show. (Bahari would later appear as a guest on “The Daily Show,” in June 2011.)

The flick is called “Rosewater” because a guy who interrogated Bahari smelled like rosewater. We’re guessing the title will be changed, after the young-guy focus groups are tested.

Anyway, Stewart optioned the book that Bahari wrote about his experience; Stewart has written the script; and Stewart is also producing the flick, in addition to directing.

Oliver will take Stewart’s place for the eight weeks of original “Daily Show” episodes that have been scheduled during Stewart’s break.

Oliver joined “The Daily Show” in 2006. His stand-up series, “John Oliver’s New York Stand-Up Show,” premiered on the cable channel in January of ’10 and aired its third season last summer.

Stewart, of course, is no newcomer to the movie biz. He’s had roles in several movies — most famously “Death to Smoochy,” in which he plays a two-faced TV suit (redundant?) named Marion Stokes.

Jon Stewart (Carolyn Kaster/AP)