Added missing - 2000 for dateTime.

The set needs to be more aware of the differences in both RTCs, 1900 for the DS3231 and 2000 for the PCF8563, will work on getting those calculations done shortly.
pull/125/head
GuruSR 2021-12-23 23:51:52 -05:00 committed by GitHub
parent 063212bcd3
commit f9a90bd32a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ void WatchyRTC::_PCFConfig(String datetime){
int Minute = _getValue(datetime, ':', 4).toInt();
int Second = _getValue(datetime, ':', 5).toInt();
//day, weekday, month, century(1=1900, 0=2000), year(0-99)
rtc_pcf.setDate(Day, _getDayOfWeek(Day, Month, Year), Month, 0, Year);//offset from 2000
rtc_pcf.setDate(Day, _getDayOfWeek(Day, Month, Year), Month, 0, Year - 2000);//offset from 2000 only for the year set.
//hr, min, sec
rtc_pcf.setTime(Hour, Minute, Second);
}