RTC on RPi
Adding a Realtime Clock to the Raspberry Pi is not super-simple but with the instructions on this page you should get an idea of how it all fits together.
(content not yet written..)
The DS3231 Realtime Clock modules have been chosen as the preferred platform for providing a Realtime Clock for the Raspberry Pi. These modules hold the time fairly well and with their 5-pin form factor they are one of the smallest RTC boards available for the RPi.
This is what the end result should look like: