2002 Subaru Forester clock resets when I shut off the car

My 2002 Subaru Forester has an electrical problem: when I shut off the car, the clock in the rooftop console often resets to 1:00. In addition, ocaissionally the radio presets will reset. What is the likely cause and suggested fix?

Check ALL of the fuses first.

Most time its caused by a weak battery If you constantly have to reset your radio stations and other electronic stuff. Had that problem in my Corolla until I replaced the battery.

The fuse for the memory circuits is most likely blown. It is located in the panel under the hood.

To add some pertinent info: Now (and for the past about 6 months, when I turn the key off, all electrical disappears-no dash lights, no radio, no clock AND cannot start or lock the car with the remote. After anywhere from a few seconds to up to 5 minutes, everything comes back on and the electrical system is back to normal, other than the clock and radio presets. Nothing seems to “make” the electrical come back–not stepping on the brake, jiggling the shift lever or the steering wheel, not taking the key out and putting it back in, not hitting the remote buttons, turning things on and off, etc.

Any more ideas?
Thanks

Does your car have a remote starter installed?
I ask because a friend of mine had the exact same symptoms with his remote start-equipped Rav-4.
It was a new vehicle, so I sent a demand letter to the manufacturer, referencing the Lemon Law.
On their third repair attempt, they finally figured out that the remote starter had been left in “test mode”, and that mode caused it to interrupt all electrical functions periodically.

Obviously, you can’t resort to the Lemon Law, but this might provide a useful clue if your car does indeed have a remote start system installed.

Check the fuse panel under the hood. See if there is any corrosion on the bottom side of it. That panel should have power to it at all times. Most of the fuses in the dash fuse panel get power provided to them through the ignition switch.