Class RTC on ESP32 documentation bug
RTC.datetime
Testing showed that the 8-tuple has the following format:
(year, month, dayofmonth, dayofweek (0..6, mon=0), hours, minutes, seconds, subseconds)
Not sure about the content/validity of "subseconds", cause this can be set to any value, even bigger 255.
Tested on firmware versions:
esp32spiram-idf3-20190529-v1.11.bin
esp32spiram-idf3-20191126-v1.11-607-g01e5802ee.bin
But documentation says:
Datetime is a tuple of the form:
(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
This is definitely wrong, documentation of pyb.RTC also does not match, cause there weekday is in range 1-7. Can not test this cause only ESP32 available.
Update documenation of machine.RTC
The documentation has incorrect signature. There is no RTC.init method. The RTC.datetime method has a different signature: it has no tzinfo parameter, and the "day of week" parameter follows the day parameter (instead of the hour).
For details see: https://stackoverflow.com/questions/49757733/micropython-on-esp8266-rtc-does-not-have-an-init-method/49758737#49758737