Rtc
Fork of RTC-DS1307 by
Diff: Rtc_Ds1307.cpp
- Revision:
- 10:32d0e8d7cc73
- Parent:
- 9:5627b407e097
--- a/Rtc_Ds1307.cpp Wed Jun 26 21:05:46 2013 +0000 +++ b/Rtc_Ds1307.cpp Wed Jun 10 16:01:49 2015 +0000 @@ -84,7 +84,7 @@ time.wday = buffer[3]; time.date = Rtc_Ds1307::bcdToDecimal( buffer[4]); time.mon = Rtc_Ds1307::bcdToDecimal( buffer[5]); - time.year = Rtc_Ds1307::bcdToDecimal(buffer[6]) + 2000; // plus hundret is because RTC is giving the years since 2000, but std c struct tm needs years since 1900 + time.year = Rtc_Ds1307::bcdToDecimal(buffer[6]) + 2015; // plus hundret is because RTC is giving the years since 2000, but std c struct tm needs years since 1900 return true; }