DFRobot Realtime clock time update issues

Hello there,
I have a real time clock SD 2403, I have to use it with Arduino Mega 2560 to keep track of time for my own project. I have downloaded the sample code from Wiki Doc

which works pretty fine. The problem I am facing is that whenever I turn the Arduino off , the time restarts from the point which I set in program, which makes this thing useless for me. The point is it does not update the time when Arduino is turned off. Meanwhile I have switched the small button on this clock. Can some on help on this issue. Thanks in advance.

Regards
Naseem Abbas

the time restarts from the point which I set in program,

It sounds like the RTC is being set to a particular time when the program is run. If so, set it once to the correct time using the program then comment out those lines before running the program again.

Use a different sketch to set up / test the RTC, then your running sketch doesn't have to have the code to
set the RTC at all...