RTC is not working in motion data logging

Hello everyone. I'm working on motion data logging. The RTC isn't working when I run the motion data logging sketch. I uncommented the rtc.adjust part in RTC examples and ran it, it worked perfectly but when i run my moton data sketch, the date goes back to 2165 and the time is wrong as well. Can anyone help me with it?

(deleted)