mirror of https://github.com/sqfmi/Watchy.git
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
parent
063212bcd3
commit
f9a90bd32a
|
@ -105,7 +105,7 @@ void WatchyRTC::_PCFConfig(String datetime){
|
||||||
int Minute = _getValue(datetime, ':', 4).toInt();
|
int Minute = _getValue(datetime, ':', 4).toInt();
|
||||||
int Second = _getValue(datetime, ':', 5).toInt();
|
int Second = _getValue(datetime, ':', 5).toInt();
|
||||||
//day, weekday, month, century(1=1900, 0=2000), year(0-99)
|
//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
|
//hr, min, sec
|
||||||
rtc_pcf.setTime(Hour, Minute, Second);
|
rtc_pcf.setTime(Hour, Minute, Second);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue