Jack and Tosh arrive at the Ritz Dance Hall, which has been abandoned since 1989. People have heard music from the 1940s coming out of it. They hear the music as they go in and go upstairs to investigate. They find nothing and start to leave but the sound of people talking echo through the halls. They go back upstairs and find the empty dance hall filled with people from 1941. Jack confirms it's a temporal shift. They go outside only to discover that it's night, the SUV has vanished, and they've been shifted back to January 20, 1941.
At the Hub, Owen wakes up as Ianto informs him that Tosh's rift alert has gone off and it's becoming increasingly unstable. They try to call Tosh but the line is dead.
In 1941, Tosh can't get through to the Hub. They go back inside.
Ianto calls Gwen in.
Jack assures Tosh that they'll get back, and until then they have to try to blend in.
Owen goes through Tosh's calculations and finds a reference to December 24, the day that Diane flew through the rift. He wonders if they could use the rift to bring back Diane but Ianto warns that doing so would devastate the city.
Jack and Tosh order drinks and an officer, George, comes over and offers to pay for the drinks as long as Tosh drinks with him. His girlfriend, Audrey, isn't amused.
Gwen goes to the Ritz and confirms the SUV is still there. She goes inside and calls out for Jack, who can dimly hear her voice. He tries to recover Tosh and Jack attacks him. A captain intervenes and forces George to apology. As Jack leaves, the captain introduces himself as Jack Harkness. The manager takes a photo of the two of them together.
Owen goes over the Ritz's history and notes it's due to be demolished in one week. As they go through the files, they find a photo of Jack and Captain Harkness together. Jack uses the alias of Captain James Harper and begs off from the drink. Outside, Jack explains that he borrowed Captain Harkness' name, and it's best if she doesn't know the whole story about his past. She notes that she has half of the equations for the rift, and the other half are at the Hub.
Gwen explores the abandoned dance hall and calls out to Jack. Tosh faintly hears her in 1941 but dismisses it as her imagination.
At the Hub, Owen and Ianto try to use Tosh's equations to reopen the rift but realize they only have half the equations, and the other half are on her laptop.
Jack and Tosh go into an office and Tosh writes down as much of her equations as she can before the battery goes dead. The manager, Bilis Manger, comes in and demands to know why they're there. Jack claims he's on leave. Tosh notices that he has an instamatic camera, and he recognizes that her laptop case is an anachronism. Jack gets her out and once they're gone, Bilis takes out a folder marked Torchwood.
Gwen comes out of the dance hall to find the caretaker outside: Bilis Manger, looking just like he does in 1941. He's glad to unlock the remaining doors so she can look around.
In 1941, Tosh wonders what will happen to her once Pearl Harbor occurs. He promises that he'll take care of her. When she wonders why he looks so at home, Jack admits that he served undercover in the military in 1941, and he took Captain Harkness' name. Jack tells Tosh that Captain Harkness dies in battle the next day. Jack and Tosh join Captain Harkness, George, and the others. Tosh talks to a navigator, Tim, so she can work out the coordinates while Captain Harkness invites Jack to talk privately.
In the present, Gwen explores the cellar while Bilis asks why her friends were there. She comes up with an excuse, noting that the hall is rumored to be haunted. He offers to make her a cup of tea.
While Tosh and Tim talk, George talks about Captain Jack's war record. A woman, Nancy, comes in to talk to Captain Harkness.
Bilis takes Gwen up to his office and asks if anyone is expecting her. She says that they are. when Bilis leaves the room, she contacts Owen and Ianto. They note that Bilis Manger, opened a new store, A Stitch in Time, and kept the photos for posterity. Gwen finds a nameplate confirming that the caretaker's name is Bilis Manger and he matches the 1941 photo, and they realize he came through the rift. While Ianto and Own argue about whether she should stay or not, Gwen slips out.
Tosh gets the information she needs and tries to slip out. Audrey confronts her, accusing her of being a Japanese spy. She grabs Tosh's bag and Jack intervenes, claiming that Tosh is an encryption expert working with the British. Tosh needs Bilis' camera to take pictures of the equations and goes to get it while Captain Harkness keeps Jack with him. Nancy joins them. In Bilis' office, Bilis finds Tosh using his camera to photograph her equations. He speaks ominously of her rarity and asks her to call again.
At the Hub, Owen prepares to use the Rift Manipulator, worried that Jack and Tosh will be caught in the Cardiff Blitz. At the dance hall, Gwen starts to leave when laughter echoes all around her. Dancers fade in and out.
Ianto tries to stop Owen, asking if he's using the Manipulator to save Diane. Owen admits he might and, when Ianto objects, brings up his dead girlfriend, Lisa. Ianto insists that he knew Lisa for years and Owen only knew Diane for a short time. Owen continues with his work but discovers a piece of the Manipulator is missing. He admits he'll have to play it Ianto's way, safe and boring.
Jack tries to go and Captain Harkness prepares to leave. Nancy, upset, wonders why he's in a hurry to go. Captain Harkness says he'll be in touch in a few weeks and it's been good. Once she's gone, Jack wonders if that's it and tells Captain Harkness to kiss. Captain Harkness insists his next mission is a routine training mission but Jack warns that anyone can happen. Captain Harkness considers his words and then goes to kiss Nancy goodbye. As they do, she whispers that she loves him. Captain Harkness returns to the table and says that now things are worse because Nancy thinks she loves him. He insists that he needs to keep his head and talks of the atrocities he's seen. Jack talks about he and a friend went to war and were captured, and the enemy tortured his friend because he was weaker. Jack blames himself for his friend's death.
Tosh goes outside and places the photo of her equations in a plastic envelope.
In the present, Ianto watches the dance hall and confirms that Bilis hasn't left. Owen goes off to interrogate Bilis and see what he knows of the rift. Meanwhile, Gwen tries to work out what Jack and Tosh would do. She notices Bilis walking away and follows him, only to find he's disappeared in an alleyway next to the dance hall. She finds an outdoor electrical box and the plastic envelope with the photo of the equations. Gwen passes them onto Ianto but realizes the first part is missing.
In 1941, Tosh realizes that she didn't photograph the first half of her equations. She goes to put the photo in the outdoor electrical box and the air raid sirens go off. She tries to get back in but finds the door locked. Bombs start dropping and the people inside the club run for shelter. Jack finds her and Tosh explains what happened. They figure the team will keep on looking.
Gwen is outside the dance hall when she gets word that Owen is inside, searching Bilis' office. She stands watch while Owen finds the manager's safe.
In the basement shelter in 1941, Tosh goes to find something permanent to write the rest of the equation with. She uses a metal coffee can to cut herself and write the equations in her own blood.
Owen gets the safe open but there's nothing inside. All of Bilis' clocks go off and Owen examines the grandfather clock. He realizes it holds the missing piece for the Rift Manipulator. He goes outside and finds Gwen, but doesn't tell her what he's discovered.
In 1941, Captain Harkness admits to Jack that he's scared. Meanwhile, Tosh puts the remaining equations in the coffee can and hides it.
Gwen continues her search and hears more music.
In 1941, the people play music and the bombing finally stops. Captain Harkness asks to talk to Jack privately.
Gwen searches the basement and finds the coffee can. She passes the equations on to Ianto, who tells Owen as he returns to the Hub. Owen warns that there are three numbers missing, and Gwen says that someone has apparently scratched them out. At the end of Tosh's note is a message saying to let her family know that she loved them.
In 1941, Bilis finds the message and erases the last three numbers.
Jack tells Captain Harkness to celebrate every night like it's his last, and he should go to Nancy. Captain Harkness agrees and asks if he has anyone, and Jack admits he doesn't.
Owen puts the missing piece into the Rift Manipulator, insisting that the machine can work out the last three numbers. When it doesn't work, he goes to Jack's safe and looks for what he needs to make the Manipulator work. He finds the safe combination hidden among Jack's belongings and the rift machine's blueprints in the safe.
Captain Harkness returns to see Jack and be with him. Before they can do anything further, Audrey and George come in, interrupting. Captain Harkness has second thoughts and leaves.
Ianto tries to stop Owen, warning that the entire thing may be a trap set up by Bilis and they need to follow Jack's orders. Owen insists that Jack isn't there leader any more and tries to get to the Rift Manipulator. They struggle and Owen knocks Ianto down and heads for the machine.
Tosh meets with Jack, who describes how Captain Harkness will die the next day during the training mission.
Owen finishes assembling the Rift Manipulator but Ianto draws a gun and tells him to put it down.
Jack explains to Tosh that he was a conman and took Captain Harkness' name and forged his records. Something brought him back to life and he joined Torchwood. He promises he'll look after her but admits there's nothing he can do for Captain Harkness. Tosh takes his hand to comfort him.
Ianto insists that Owen has to let Diane go, insisting Jack needs him. Owen insists on beating the rift in the line of duty. When he inserts the piece, Ianto shoots him in the shoulder but Owen manages to activate the Manipulator.
Captain Harkness looks over at Jack and then walks toward him and takes his hand. They dance to the music as Harkness' men stare in shock. The two men start to kiss but there's a sudden burst of energy. Tosh calls after Jack as she runs toward the light, insisting they need him. Jack tells Captain Harkness it's his duty and he has to go. He gives him a final kiss and then walks into the rift with Tosh. Captain Harkness gives him one final salute before disappearing along with everyone else.
Bilis watches, smiling, as Jack and Tosh return to the present.
Outside, Gwen greets Jack and Tosh as they come out.
Later, Tosh helps Owen treats his wound. He insists he did the right thing. Jack goes into his office and pours himself and Tosh a drink. She says that Captain Harkness would have been proud of Jack taking his name and saving the world, and they share a toast.