I flashed the ds3231 example provided by the library:
2018/10/31 (Wednesday) 0:0:36
since midnight 1/1/1970 = 1540944036s = 17835d
now + 7d + 30s: 2018/11/7 12:30:42
Returning the correct unixtime with 1540944036, so it is getting even more strange…
Update:
I tried to make my code exactly like in the example writing the result in "testvar"
same stuff:
Timestamp: 1540944934
Timestamp RTC Unix: 1573949734
2018
10
31
0
15
34
2018/10/31 (Wednesday) 0:0:36
since midnight 1/1/1970 = 1540944036s = 17835d
now + 7d + 30s: 2018/11/7 12:30:42
Returning the correct unixtime with 1540944036, so it is getting even more strange…
Update:
I tried to make my code exactly like in the example writing the result in "testvar"
Code:
DateTime testvar = RTC.now();
Serial.print("Timestamp: ");
Serial.println(now());
Serial.print("Timestamp RTC Unix: ");
Serial.println(testvar.unixtime());
Serial.println(RTC.now().year());
Serial.println(RTC.now().month());
Serial.println(RTC.now().day());
Serial.println(RTC.now().hour());
Serial.println(RTC.now().minute());
Serial.println(RTC.now().second());same stuff:
Timestamp: 1540944934
Timestamp RTC Unix: 1573949734
2018
10
31
0
15
34

