Hi Everybody!
I trying to use the RTClib at the Arduino 0022ubuntu0.1 but I had some problems in set the correct date and time.
I'm using the example ds1307, but the result is
2000/0/0 0:0:0
since midnight 1/1/1970 = 2313941504s = 26781d
now + 7d + 30s: 2043/5/6 17:32:14
I read the the time was set by the instruction:
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}
And I read that this instruction take the computer date and time to set de rtc1307 date.
I just tryed the same code in two different computers (my own with ubuntu and another one with windows), but the result is the same. Does anyone know how to solve this?
Thanks everybody!
Regards!