Time Out of Joint is a novel by Philip K. Dick, first published in novel form in the United States in 1959. It was also serialised in the British science fiction magazine New Worlds Science Fiction in several installments from December 1959 to February 1960.
The novel epitomises many of Dick's themes, with its concern about the nature of reality, and ordinary people in ordinary lives having the world unravel around them. The title is a reference to what Hamlet says to Horatio after being visited by his father's ghost, and learning that his uncle Claudius murdered his father; in short, a shocking supernatural event that fundamentally alters the way Hamlet perceives the state and the universe ("The time is out of joint; O cursed spite!/That ever I was born to set it right!" [I.V.211-2]).
Several of the novels themes and ideas were used for the basis of the award-winning 1998 film, The Truman Show, starring Jim Carrey, about a man who discovers that his entire life is an elaborate soap opera.
Confusion gradually mounts for Gumm; one of his neighbours, observing this, starts worrying: "What if Gumm were becoming sane?". In fact, Gumm does become sane, and the deception surrounding him (erected to protect and exploit him) begins to unravel.
Gumm eventually learns that the idyllic neighborhood he lives in is a construct designed to protect him from the frightening fact that he lives on a then-future Earth (circa 1998) that is embroiled in a colonial war of independence with the Moon comparable to England's war against the American Revolutionaries. Gumm's is the only consistently accurate method for predicting where nuclear strikes will be aimed, in that his puzzle-solving skills have saved untold thousands of lives over the years by enabling antimissile deflection. The town provides a psychological safety blanket that allows him to perform this task without understanding his dire responsibility. Having learned the truth, Gumm defects to the Lunar colonists, deciding that the values and perceptions of the Earthlings are a mistake. There is an indication that the war might end as a result.