hi every body ! i found a source code to use RTC DS1307 and display time on LCD1602. When i upload code to arduino. The time on LCD is correct. But when i unplug USB cable and then plug it to computer again. the time is not correct. Please help me correct it ! Thankshere is my code :

Who would know? Your battery could be dead but I think the programme is junk. A comment lines says it updates the DS1307 each and every upload and, if that is the case, it seems you might as well look at your watch and use the millis counter.