Error Real Time Clock implementation AVR microcontroller
The AVR's internal oscillator is unsuitable for your purpose. This is from the datasheet:

You should switch to an external crystal clock source at least. Better yet would be an RTC chip with a precision crystal oscillator if you need accurate timekeeping.