It does not appear you have a battery issue.
The MacTracker database shows the last iMac 27" to have an internal backup battery (Apple's term) was the Mid 2010 model. The last 21.5"iMac with that battery was the Mid-2011. It is possible the change was to make the newer iMac sealed-case form factor possible. Changing internal batteries is no longer an at-home job.
This is confirmed by a popular self-service site that I'm not allowed to link, and by the compatibility chart for the CR2032 battery on the OWC site:
3V NewerTech Lithium CR2032 coin battery- Computer PRAM Clock Battery & also for Apple Remote
Newer systems often use a capacitance system. The batteries were never intended for long-term runtimes. They were intended for short periods off wall power such as for moving or maintenance. The capacitance systems, if that is what is used, have similar limitations.
If you want to unplug your computer every night, resetting the clock will be one of your morning routines.