A Farewell to Arms (Futurama)

As the Planet Express crew go down the burrow to get them (with Leela breaking her leg when Fry tries to save her from falling), they stumble upon an ancient Martian pyramid and a large stone calendar.

Amy translates the ideograms on the calendar, as she is somewhat familiar with the Martian language, and concludes that the world will end in 3012, the current year.

Farnsworth reviews the data from the weather balloon and finds that the Sun is about to release a giant solar flare that will destroy the planet.

An electromagnetic storm causes all electronic devices on Earth to stop working, including spaceships, preventing evacuation from the planet.

They are then approached by the Martian Chief Singing Wind (who has returned to Mars to retrieve his possessions after abandoning his planet in "Where the Buggalo Roam").