All Our Yesterdays (episode)
Kirk, Spock, and McCoy are trapped in a planet's distant pasts, where Spock finds love with an exiled woman.

Summary

Teaser
 
A star shines with a reddish glow, and will soon destroy the planet orbiting it, Sarpeidon, in a supernova. Captain Kirk plans to go with a landing party to warn the inhabitants that their sun (the star Beta Niobe) is about to destroy their planet.

Kirk materializes with Doctor McCoy and Spock in a room. They find the building is empty except for Mr. Atoz, a librarian in this library. They soon meet several of his replicas.

Act One
Atoz tells the 's landing party that the inhabitants knew about the impending supernova. They are safe by traveling into the planet's past, using a time portal called the atavachron. Kirk and McCoy are intrigued by the library and start exploring the small discs which archive the planet's past. Kirk is viewing a disc of an era of horse-drawn carriages, when people wore the style that resembles 17th century England on Earth. McCoy is viewing one detailing the Sarpeidon Ice Age. Spock offers to evacuate Atoz, but Atoz explains he will join his wife and family when the supernova comes. Suddenly, Kirk heard a scream so he runs toward the adjoining room... the atavachron repeatedly flashes and instantly he stands by a brick wall during the era of the disc that he saw. Spock and McCoy immediately follow after him, and appear in a windy blizzard on frozen wasteland. They realize that they are in the era five thousand years prior when this planet was in an ice age.

Kirk sees a man push a lady, then another fop pushes her. He runs to stop this evil, just as one raises a fencing sword to slash her. He grabs the arm of the murderer. The other draws a sword, so Kirk duels with him. When Kirk wins, the two men flee, and Kirk discovers that the woman is a thief. 

Kirk looks back to the brick wall and cannot find the entrance back to the library.

Act Two

Kirk goes to the wall from which he had emerged and is able to talk to McCoy and Spock, but cannot get to them. When Kirk is arrested by the authorities for aiding a thief, McCoy and Spock ask him what is going on, and the authorities can also hear the voices. The woman then betrays Kirk and denounces him as a witch, claiming that he and the "spirits" made her steal against her will. Kirk is forcefully taken away.

Meanwhile, Spock and McCoy try to find shelter while stuck in Sarpedion's ice age. McCoy falls down, his hands and face are frostbitten and he cannot feel his feet. McCoy asks Spock to abandon him and find Kirk himself but Spock refuses. Just then, a figure clothed in a jacket and hood emerges from the snow and leads them to a heated cave. Spock has McCoy put onto a bed and wraps him up in a blanket. The figure removes its hood and jacket, revealing it to be a beautiful woman named Zarabeth. While McCoy sleeps, she informs Spock that she has been exiled to the ice age because one of her kinsman tried to assassinate Zor Kahn, the tyrannical leader of her time.

While in prison, Kirk is questioned by the Prosecutor. When Kirk mentions the library, the Prosecutor becomes extremely uncomfortable. At first, he tries to maintain that Kirk might indeed be innocent. But when the guard insists that he heard voices talking to Kirk, he is forced to back off. When Kirk then starts repeating the word "library" to the Prosecutor, the Prosecutor gets flustered and rushes out, saying he wants nothing to do with Kirk.

Act Three
Meanwhile, in the ice age, Spock tells Zarabeth that he must find his captain and get back to his own time. He proposes that she join him and the doctor and find the time portal. He will have the both of them immediately beamed up to the Enterprise upon making it to the future. However, Zarabeth tells Spock that the atavachron alters a person's  structure and that he therefore cannot return to the future, as he will die. 

At the same time, Kirk escapes from his cell when he grabs the guard who is trying to pour soup into his bowl, steals his cell keys, and knocks him out. Kirk hides the guard's body to the side of his cell just as the Prosecutor arrives to take Kirk to the inquisition. However, Kirk overpowers him as well. He questions him and comes to realize that he too had also been sent from the future. Kirk threatens to denounce him as a witch as well if he does not help get him back to the library. The Prosecutor then informs Kirk that the atavachron alters cell structure and brain patterns to prepare people for their journey into the past. The Prosecutor had been "prepared" before crossing and cannot return without immediately dying, but when Kirk announces that he hadn't been similarly prepared, the Prosecutor tells him that they must get him back to the future immediately. If not, Kirk can only survive for a few hours in the past. The Prosecutor then leads Kirk back to the brick wall from which he had emerged. The Prosecutor says he cannot go any further and backs away while Kirk steps back into the library and returns to his own time. He meets one of the Atoz replicas, who insists again that Kirk be prepared, and Kirk is forced to lock him in a closet. Another replica appears and Kirk knocks him out. The real Atoz then appears and stuns Kirk with a cylindrical weapon.

Act Four
In the ice age, Spock's personality is beginning to change. He falls in love with Zarabeth and believes her when she tells him he cannot go back. McCoy notices the changes in Spock (especially when Spock responds to a typical insult from the doctor by grabbing him by the scruff of the neck and announcing "I don't like that") and guesses that Zarabeth is not being completely truthful in order to keep Spock with her. Spock also begins to notice that he is not himself after he eats meat and enjoys it. However, even with this knowledge in hand, Spock continues and proceeds to tell Zarabeth that she is beautiful and embraces her. While kissing her, he then begins to further emote and smiles.

Meanwhile, Kirk has managed to recover enough from the stun blast to avoid having Atoz wheel him back into the atavachron. He overpowers Atoz and forces him to help him locate Spock and McCoy by trying out various discs in the viewer. McCoy has begun to realize that it is only Zarabeth who cannot return and confronts Spock with this fact. When McCoy also confronts Zarabeth and tries to force her to admit the truth to Spock, Spock grabs McCoy and flings him against a wall with his hand around his neck. McCoy then asks Spock if he's trying to kill him and if that's what Spock really wants. Spock angrily asserts that this is impossible for him to be acting like this because he's a Vulcan. McCoy reminds Spock that the  he knows won't exist for another five thousand years and then asks Spock what's happening there at this very moment. Spock remembers his ancestors at that point were warlike barbarians and McCoy tells Spock he's reverting to the ways of his ancestors, five thousand years before he was born. Spock says he has lost himself and does not know who he is anymore. He then asks Zarabeth if it's possible for them to go back. She says she doesn't know definitively but McCoy says he's going to try to find the portal because that's where his home and life is.

Spock agrees finally to go with him and Zarabeth accompanies them as well. When they find the area where they had came into the past, and where they once again hear Kirk call out to them through the atavachron, Spock can't bring himself to leave Zarabeth alone in the past. But she once again tells Spock that if she were to cross through the portal she would immediately die. Kirk calls to McCoy and Spock and tells them they've got to come back, that it's almost time for the supernova. Spock tries to send McCoy on ahead but McCoy can't go through. Mr. Atoz realizes that they can't come back separately because they had gone through together initially. Finally, Zarabeth turns and leaves them behind and Spock reluctantly goes with McCoy back through the portal. Zarabeth turns around and takes one last look at Spock, with a tear running down her cheek.

With everyone back, Atoz puts in a disc, pushes Kirk, Spock, and McCoy out of his way, and rushes to join his family before it is too late. Kirk tells McCoy that Atoz had his escape well planned, and that Kirk is glad he made it to where he was going. He then begins to call the Enterprise to have Scott beam them up. Spock tells McCoy that there's no need to watch him anymore, that he has fully returned to the present. McCoy tells Spock that it did happen though, and Spock agrees, but that it was five thousand years ago and Zarabeth is dead now, dead and buried, long, long ago. On Kirk's communicator Scott tells Kirk "It's now or never." Kirk orders them to be beamed up and to have the Enterprise taken to maximum warp as soon as they're aboard. The landing party is beamed up and the Enterprise warps out of orbit just as Beta Niobe explodes into a supernova and Sarpeidon disintegrates.

Log entries 
 Captain's log, USS Enterprise (NCC-1701), 2269

Memorable quotes 
"A library serves no purpose unless someone is using it."
 - Atoz, to Kirk

"You're a very agile man, Mister Atoz! Just how many of you are there?"
 - Kirk, after encountering another Atoz

"We're in a wilderness of arctic characteristics."
"He means it's cold!"
 - Spock and McCoy, talking to Kirk through the atavachron portal

"Away! Away, spirit! And let honest men approach."
 - Constable, on hearing Spock and McCoy's voices

"We go together."
"You stubborn, thickheaded Vulcan!"
 - Spock and McCoy, after McCoy collapses in the snow

"I'm called Spock."
"Even your name is strange."
 - Spock and Zarabeth, in the cave

"Do you know what it's like to be alone, really alone?"
"Yes. I know what it is like."
 - Zarabeth and Spock

"What is this island?"
"It's called Earth."
"I know no island Earth. No matter. Continue."
 - Kirk and the Prosecutor, in Kirk's jail cell

"I heard the spirit talk to him. He answered...and did call it "Bones"!"
 - Constable, relating Kirk calling out to McCoy

"Witch!! Witch!! They'll burn ya!"
 - Mort, in her cell

"Don't let him doctor you. I'm the doctor around here."
"And known as the worst patient in the entire crew of the Enterprise."
 - McCoy and Spock, to Zarabeth

"Now you listen to me, you pointy-eared Vulcan!"
"I don't like that! I don't think I ever did, and now I'm sure!"
"What's happening to you, Spock?"
"Nothing that shouldn't have happened long ago."
 - McCoy and Spock, as he grabs McCoy

"You are beautiful. More beautiful than any dream of beauty I've ever known."
 - Spock, after kissing Zarabeth

"Spock, you're reverting into your ancestors five thousand years before you were born!"
 - McCoy, on Spock's behavior

"I know I'm going to try, Spock, because my life is back there. And I want that life."
 - McCoy, on returning to the portal

"And she is dead now. Dead and buried. Long ago."
 - Spock to McCoy, on Zarabeth

Background information

Production timeline 
 Story outline by Jean Lisette Aroeste, titled "A Handful of Dust", 
 Revised story outline, 
 First draft teleplay, titled "All Our Yesterdays", 
 Second draft teleplay, 
 Final draft teleplay by Arthur Singer, 
 Revised Final draft telepay by Fred Freiberger, 
 Additional page revisions by Freiberger, 
 Filmed:  – 
 Day 1 – , Friday – Paramount European Town backlot: Ext. Alleyway; Desilu Stage 10: Ext. Alleyway wall
 Day 2 – , Monday – Desilu Stage 10: Ext. Alleyway wall, Int. Jail cell, Ext. Arctic, Ice cliff
 Day 3 – , Tuesday – Paramount Stage 5: Int. Caverns, Cavern living room
 Day 4 – , Thursday – Paramount Stage 5: Int. Interior Cavern, Cavern sleeping chamber
 Day 5 – , Friday – Paramount Stage 5: Int. Library
 Day 6 – , Monday – Paramount Stage 5: Int. Library
 Original airdate, 
 Rerun airdate, 
 First UK airdate

Syndication cuts 

During the syndication run of Star Trek, no official syndication cuts were made to this episode.  However, several local television stations would often edit extended bits of dialogue in order to allow for more commercial breaks.  This included:
 Atoz expressing regret at Kirk wanting to know about "recent history", stating that there was no great demand for such information.
 A longer scene where the lawman identifies Kirk as the "Mort's henchman"
 The Magistrate cautioning the Mort that he had no doubt about her guilt and to not falsely accuse Kirk.
 Mr. Atoz telling Kirk that his actions would get both Atoz and Kirk killed, and that Atoz didn't want to die.
 Spock's telling Zarabeth that Vulcan was "millions of light years" from Sarpeidon.  This allowed for the removal of a glaring plot error, given that this meant the Enterprise would be capable of intergalactic travel. (The Star Trek Compendium)

Story and script 
 Story outline, "A Handful of Dust" , had Spock and McCoy trapped in a desert wasteland, with McCoy dying from the desert heat when the pair was captured by misshapen humanoids, and there was no Zarabeth. Kirk was trapped in a period which resembled San Francisco's Barbary Coast, but returns to the library with another time traveler. At the end the time traveler who helped Kirk destroys the time portal. Kirk, Spock, and McCoy flee the building and it ages to a hollowed ruin behind them. Kirk picks up a tattered book and it literally crumbles to dust in his hands.  
 The title for this episode is from Shakespeare's Macbeth, Act V, Scene 5, line 22: "And all our yesterdays have lighted fools/ The way to dusty death. Out, out, brief candle." Other episodes with titles from Shakespeare are , , , , , ,  and .
 A scene in the story draft that was cut would have had McCoy "stuck" in the time doorway, with part of his body in the present and the rest in the past.
 Mr. Atoz's name is a word play – a librarian named "A to Z."  The name for this character was selected to suggest how one might search a library: from "A to Z". () Author Jean Lisette Aroeste was a UCLA librarian at the time she wrote this script.

Cast 
 George Takei (Sulu), Nichelle Nichols (Uhura) and Walter Koenig (Chekov) do not appear in this episode. James Doohan (Scotty) does not appear on screen but has several voice-over lines. In no other episode are only three regular members of the crew seen in person.
 Mariette Hartley (Zarabeth) was not allowed to show her belly-button in this episode, despite the appearances of other navels in previous episodes. To comment on this censorship, Gene Roddenberry gave Hartley's character two navels in his pilot, "Genesis II", stating that "the network owed me one." (Star Trek Compendium)

Sets and props 
 The interior of the Enterprise is not seen in this episode, marking this as the only episode of TOS in which none of the action takes place aboard the ship.
 The brief sword fight scene is the only outdoor shot in the series after .
 The stock footage showing the endless snow fields on the disc McCoy watches was also used as the surface of Exo III in .
 The atavachron device is the reused prop of Gary Seven's Beta 5 computer from .
 The floor of the Sarpeidon library is identical to the floor of the asylum on Elba II in .

Continuity 
 According to the stardate this episode is chronologically the last of the series, even though its production number and air date are earlier than . This is the last time travel episode of TOS.
 This is the only episode of any Star Trek series to ever mention a physiological limitation on time travel. According to Mr. Atoz, one had to undergo what he called "preparation" for the era which they would travel to. Failure to do so would result in death after a few hours. Additionally, one could not return to the present era for the same reason (the reason Zarabeth could not accompany Spock and McCoy). It is not known whether this is a result of how the atavachron works, a characteristic of Sarpeidon's atmosphere, or something unique to Sarpeidon's inhabitants.
 Additionally, this is the only Star Trek story which mentions mental changes to travelers traveling to the past. Spock found himself reverting to the savage nature of the Vulcans of that time period. Curiously, however, McCoy did not find himself reverting to the relative savagery or intelligence of Humans from five thousand years ago. This could be interpreted to mean that Humans have changed little in five thousand years, technology notwithstanding.  Or it could reflect Spock's telepathy – we have seen how linked he is to the Vulcan people when the Intrepid was destroyed.
 briefly references the fact of Enterprises presence near Beta Niobe when it began its supernova explosion.

Remastered information 

The remastered version of "All Our Yesterdays" aired in many North American markets during the weekend of . While the episode required very few new effects, the planet Sarpeidon was given a CGI-makeover as was its sun, Beta Niobe. When that star goes nova at the end of the episode, dramatic new effects were inserted into the episode, based upon photographs taken by the Hubble Space Telescope. Initially, when Beta Niobe explodes, Sarpeidon glows before disappearing. And in the remastered version, Sarpeidon crumbles into dust from the supernova blast.

Novelization releases
Bantam Books published a series of fotonovels, which took photographic stills from actual episodes and arranged word balloons and text over them, to create a  formatted story. The sixth installment was an adaptation of this episode, released in . This was the last of Bantam Books Star Trek fotonovel releases to see internationally translated editions. Translated into Dutch as Al onze dagen van Weleer, the Dutch language edition saw a release in , whereas a German language edition was released in  as Flucht aus der Vergangenheit.
The novels Yesterday's Son and Time for Yesterday written by A.C. Crispin are non-canon follow-ups to this episode, concerning a conceived child of Spock and Zarabeth named "Zar."

Video and DVD releases 
 Original US Betamax release: 
 UK VHS release (two-episode tapes, CIC Video): Volume 40, catalog number VHR 2436, 
This volume is a three-episode tape to close out the series.
 US VHS release: 
 UK re-release (three-episode tapes, CIC Video): Volume 3.8, 
 Original US DVD release (single-disc): Volume 39, 
 As part of the TOS Season 3 DVD collection
 As part of the TOS-R Season 3 DVD collection.

Links and references

Starring 
 William Shatner as Kirk

Also starring 
 Leonard Nimoy as Mr. Spock
 DeForest Kelley as Dr. McCoy

Guest star 
 Mariette Hartley as Zarabeth

Co-starring 
 Ian Wolfe as Mr. Atoz (s)
 Kermit Murdock as Prosecutor
 Ed Bakey as First Fop
 James Doohan as Scott
 Anna Karen as Woman
 Al Cavens as Second Fop
 Stan Barrett as Jailer
And
 Johnny Haymer as Constable

Uncredited 
 Unknown performers as:
 Constable #2
 Several onlookers
 Townspeople (archived footage)

References 
5,000 years ago; accomplice; accusation; "all right"; alternative; ancestor; angler; animal flesh; answer; archive; arrest; "as a matter of fact"; atavachron; Atoz's family; attack; attention; barbarian; beauty; bed; belief; benefactor; Beta Niobe; "Bones"; book; boulder; brain pattern; bruise; building; cell structure; century; chance; ; cheating; choice; class M; cliff; climate; collection; commanding officer; companionship; comrade; conspiracy; constable; controlling mechanism; cook; crime; cup; danger; ; death; desk; ; door; dream; Earth; equation; evil spirit; execution; exile; face; fact; false accusation; feeling; feet; field of interest; file; food and clothing animals; "for the moment"; fop; friend; frostbite; "go ahead"; greenhouse; ; hand; head; ; henchman; hour; horse; hot spring; humanoid species; ice; individual; information; inhabitant; Inquisitional Tribunal; ; instruction; "I see"; island; jailor; jealousy; key; kinsman; landing party; lie; law; leech (slang); lesson; librarian; library; light year; logic; loneliness; lord; luxury; machine; manners; mass suicide; ; maximum warp; meat; medical license; medication; medicine; millennium; million; minute; mistake; mort; mouth; Mort's leech; murder; name; "no matter"; nomenclature; nourishment; nova; "now or never"; "of course"; "of sorts"; order; passion; patient; person; phaser; physiology; place; place of safety;  power source; pre-warp civilization; prisoner; prosecutor; progress; purse; purse cutting; question; rage; rapier; reading; reference material; Reference Services; replica; report; sacrilege; sapient lifeform; Sarpeidon; Sarpeidon Ice Age; Sarpeidon native; ; scream; search; shelter; slave; spell; "stand by"; story; stranger; stubborn; subject; suicidal maniac; supernova; supper; survivor; tape viewer; thief; thievery; thing; time period; time portal; trial; truth; tyrant; verism tape (aka history tape); vixen; voice; Vulcans; ; wall; weapon; weather; wilderness; wind; witch; witchcraft; witness; word; Zarabeth's kinsmen; Zor Kahn

Unreferenced material 
Coradrenalin; musketeer; ; troglodyte;

External links 
 
 
 
 

de:Portal in die Vergangenheit
es:All Our Yesterdays
fr:All Our Yesterdays (épisode)
it:Un tuffo nel passato (episodio)
ja:タイムマシンの危機（エピソード）
nl:All Our Yesterdays
pl:All Our Yesterdays
TOS episodes