The C/C++ time library provide the functionality currently provided by the DateTime class.
With the time/date management out of the way,
it possible to implement a small RTC library which only deals with the RTC setup on a esp8266 or a esp32:
check if the RTC is present
read the RTC time/date registers
write the RTC time/date registers
Unfortunately mktime on the current release of esp8266/Arduino core is broken.
It is already fixed on the github version and should be released at some point in the future.
Until then, the development and testing for the esp8266 needs to relay on the DateTime class (provided by RTClibJeeLab's or Adafruit version). Other option is TimeLib by PaulStoffregen, which provides similar functionality to the C/C++ time library.
This PR provides an easy way to keep the DateTime (master branch) and C/C++ (ctime branch) versions of the code in sync.
The C/C++ time library provide the functionality currently provided by the DateTime class. With the time/date management out of the way, it possible to implement a small RTC library which only deals with the RTC setup on a esp8266 or a esp32:
Unfortunately
mktime
on the current release of esp8266/Arduino core is broken. It is already fixed on the github version and should be released at some point in the future. Until then, the development and testing for the esp8266 needs to relay on the DateTime class (provided byRTClib
JeeLab's or Adafruit version). Other option isTimeLib
by PaulStoffregen, which provides similar functionality to the C/C++ time library.This PR provides an easy way to keep the DateTime (
master
branch) and C/C++ (ctime
branch) versions of the code in sync.