esp32 localtime and machine.RTC().datetime() inconformity
see this
https://github.com/micropython/micropython/blob/b33f108cdeb57c9d84e5a4eff5a46aa49c6dd558/ports/esp32/modutime.c#L52
and this
https://github.com/micropython/micropython/blob/b9ec6037edf5e6ff6f8f400d70f7351d1b0af67d/ports/esp32/machine_rtc.c#L105
I know it seems to have been designed, but if I assign values like this, I won't be able to use the following code.
machine.RTC().datetime(time.localtime(546450051)) # 546450051 only a number.
Is there a better way to set seconds to RTC time.
Otherwise I'll fill in the third element to align the structures, is that so?
esp32/rtc: Update microseconds in RTC.datetime()
Fixes https://github.com/micropython/micropython/issues/5315
Set the microseconds component of the current system time when setting the RTC time with RTC.datetime().
Before this change: The RTC microseconds was reset to zero when updating the time.
After this change: The RTC microseconds are correctly set, allowing accurate time updates.