From f9a90bd32a29e0807b378210bd10e1e4610382c7 Mon Sep 17 00:00:00 2001 From: GuruSR Date: Thu, 23 Dec 2021 23:51:52 -0500 Subject: [PATCH] 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. --- src/WatchyRTC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WatchyRTC.cpp b/src/WatchyRTC.cpp index 0beb167..851bbe9 100644 --- a/src/WatchyRTC.cpp +++ b/src/WatchyRTC.cpp @@ -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); }