P4X-639 was once a colony of the Ancients that had thrived for thousands of years until it was struck by some unspecified cataclysm. To avoid their fate, the inhabitants built a time machine to go back and change their own history. The alien device draws its energy from ionization in the atmosphere caused by geomagnetic storms which recur every 50 years. The beam from the device can access the stargate's subspace field in order to create a kind of time inversion outside of subspace. However, the device never worked. Instead, it caused a short term continuous loop, and in the end the inhabitants shut it down and let the end come.
Malikai, an archaeologist, had been making visits to the long-deserted planet to study the alien device, and he hoped to go back in time to be with his wife once again. However, he inadvertently established a simultaneous connection from P4X-639 to 13 other worlds including Earth and Alaris, creating a subspace bubble in which everything was cut off from the normal flow of time, resulting in a continuous loop repeating every 6 to 10 hours. Only O'Neill and Teal'c were aware of the looping of time, and their repeated attempts to prevent the activation of the device and to block the incoming wormhole proved futile. Eventually, with their assistance, Daniel was able to translate the writings on the planet's ruins to learn the significance of the alien device, and SG-1 was able to convince Malikai to shut down the machine and break the cycle. Earth returned to the normal flow of time, having been out of sync with the rest of the gate network for more than three months.
Cross Reference: Ancients, Ancient Control Console, Malikai, P4X-639, Time Travel
Episode Reference: Window of Opportunity