programing a RTC DS1307

Hi every one
I tried to use the DS1307 for my solar tracker’s project but I have a Nightmare problem, i wired up the ds1307 with arduino like i read in the manuel of “adafruit”
GND => GND in arduino
5v => 5v
SDA => pin 4
SCL => pin 5

i upload the sketch to arduino and open the terminal port on 57500 bps i get a wrong time and date

without counting the time as it appear in the picture

I thought that’s is Ok because in the document they mention it, after that i uncomment the line

//RTC.adjust(DateTime(DATE, TIME));

which should allow the DS1307 to get the correct time from my computer and start counting the time

but there’s nothing change the clock still displaying a wrong time and date and without moving.
i don’t understand where the mistake i did everything right, i tried other libraries and other sketches because i thought the problem with the sketch but nothing change
please if anyone know how to solve this problem i’ll appreciate the help because i’m running out of the time to present my project :frowning:


Try the program here:

I have some demo code in my DS1307 library that allows you to set and inspect the registers on the clock IC. If you are interested, download from the code libraries link in my signature.