avaldebe / UxTClib

ctime clock library for ESP8266 and ESP32
MIT License
3 stars 1 forks source link

use C/C++ time libraries instead of DateTime class #5

Closed avaldebe closed 6 years ago

avaldebe commented 6 years ago

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 by RTClib JeeLab'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.