If your battery is going bad, then it can still measure 12v when it's not supplying current for any loads. When you try to start the engine, that battery drops to 5 or 6 volts, while the starter solenoid chatters. The voltage drops low enough to cause the clock to reset. If the battery is OK, but some of the big power cables have dirty/loose/corroded connections, that can cause almost the same thing. Sometimes it's loose where the wire itself is crimped into it's end terminal.
So... Did you check both ends of ALL those big cables yet? Did you measure current draw when you think everything's turned off? Or do you believe in electrical diagnosis by internet majority rule?