Asgard technology includes the ability to create a time dilation bubble in which time within a given area passes much more slowly or much more quickly than time outside the bubble. This technology was used as a means to combat the Replicators by activating a time dilation device on Hala that would trap the Replicators in a field where time would be slowed by a factor of 104, allowing the Asgard to buy enough time to devise a way to eliminate the Replicators entirely.
When the Asgard offered all their knowledge and technology to the people of Earth, Thor oversaw the installation of a new Asgard computer core aboard the Odyssey that included time dilation technology. The Asgard core was equipped with its own power source that would not infringe on the ship's ZPM but which would be fully integrated into all the ship's systems once the upgrades were complete. Inexplicably, however, the Asgard upgrades seemed to be responsible for allowing Ori warships to track the Odyssey, even through hyperspace, and as Odyssey returned from Orilla, it was pursued by Ori ships. Because the Odyssey came under attack each time it emerged from hyperspace, Carter was unable to isolate the Asgard core from the hyperdrive controls to prevent the ship from being traced before it once again came under attack.
At P3X-474, Odyssey dropped out of hyperspace to beam the crew to the planet's surface, from which they could gate home. Only Landry and SG-1 remained aboard in an attempt to engage the Ori and preserve the ship. As the Ori weapons fire threatened to destroy the Odyssey, Carter activated the time dilation technology, creating a time dilation bubble around the ship which seemed to freeze the Ori weapon in time. Years would pass inside the bubble while mere fractions of a second would pass outside the field.
Carter's intention was to use the time inside the bubble to recreate Merlin's phase-shift technology from scratch and to make the necessary modifications to the Odyssey so that it could be taken out of phase, allowing the weapons fire to pass harmlessly through the ship. However, after two weeks, Carter determined that the ship could not be taken out of phase before shutting down the time dilation field, and after the field would be shut down, the .86 seconds before the weapons blast hit would not allow enough time to take the ship out of phase or to escape using transport beams or F-302s. The team became trapped in time aboard the Odyssey.
By modifying the Asgard beaming technology, Carter was able to create a matter converter capable of manufacturing food, water, oxygen, and almost anything the team needed to survive. During their time on the ship, Carter continued to search for a solution, and she created a cello which she taught herself to play. Daniel conducted research using the Asgard database, insisting that the ship must be preserved so that the knowledge would not be lost. Teal'c and Mitchell took up active hobbies like jogging and sparring, frustrated by the inability to find a means of escape. After about three months, Daniel and Vala began a romantic relationship which lasted for many years. Landy engaged in his hobby of horticulture, but after more than 20 years, the team lost their commander as Landry passed away from old age.
For more than 50 years the team remained trapped. Finally, Carter theorized an alternate solution that would allow them to quickly sever the connection between the Asgard core and the hyperdrive controls and reverse time in the localized field, erasing the past 50 years and returning them to the moment the battle began. However, maintaining the time dilation bubble for 50 years had almost completely depleted both the ZPM and the power source in the Asgard core, and there was not enough energy to carry out the plan. Mitchell proposed instead using the power of the Ori weapons blast itself. By rerouting the power conduits throughout the ship, the Odyssey would be able to absorb the blast of the Ori weapon. The ship would explode, and they would be dead for milliseconds, but enough energy from the blast would be channeled into the Asgard core to activate the reverse time field and undo history.
In order for the plan to work, one member of the team would have to remain isolated from the reversal of time in order to retain the information that would prevent history from repeating. Although Teal'c had aged to more than 150 years old, he has a longer life span than the average human, and he volunteered to remain old so that the plan could succeed. Teal'c remained inside a force field as the time dilation bubble was disengaged and the Ori weapon struck the Odyssey. The ship was destroyed around him as power was channeled to the core and the reverse time field was activated. Suddenly time seemed to freeze and then move backward to the beginning of the battle 50 years ago. Teal'c retained the programming crystal and used it to shut down the Asgard core, and history was redirected. The Odyssey escaped into hyperspace, no longer pursued by the Ori.
Only Teal'c retained the memory of those 50 years on the ship, and a streak of grey on the right side of his hair is the indication of the additional years he has lived. Despite persistent questioning by the team, Teal'c chose not to reveal the personal details of the 50 years that had been erased. As if those years had never happened, the team returned to duty and prepared for the next mission to the planet at 9-18-27-15-21-36.
Cross Reference: Samantha Carter, Daniel Jackson, Hank Landry, Vala Mal Doran, Cameron Mitchell, Odyssey, P3X-474, Teal'c, Time Dilation Device, Time Travel
Episode Reference: Unending
Stargate Coordinates of Final Unnamed Planet: 9-18-27-15-21-36