Using these libraries:TimeLib.h, Time.h and DS1307RTC.h
As described in the time library in PJRC time library page: https://www.pjrc.com/teensy/td_libs_Time.html a time_t number will return the number of seconds elapsed since 1970.
But i try to output time as a time_t number:
These are the outputs i get:
I did checked that i do get the correct time when i try to output hour() or minute() and i get the correct time of the day.
I understand it's still usable but, is there any way to get time as a time_t positive number ?
As described in the time library in PJRC time library page: https://www.pjrc.com/teensy/td_libs_Time.html a time_t number will return the number of seconds elapsed since 1970.
But i try to output time as a time_t number:
Code:
time_t timeNow = now();
Serial.print("time now as a time_t number is: ");
Serial.print(timeNow);
Serial.println();
These are the outputs i get:
Code:
time now as a time_t number is: -1271949714
time now as a time_t number is: -1271949703
time now as a time_t number is: -1271949693
time now as a time_t number is: -1271949682
I did checked that i do get the correct time when i try to output hour() or minute() and i get the correct time of the day.
I understand it's still usable but, is there any way to get time as a time_t positive number ?