Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
rtc - ntp with tz handling leads to error #130
after connecting to WiFi I try following code:
from machine import RTC
This leads to error -> ValueError: tz string length must be 3 - 64
after checking the code in file "MicroPython_BUILD/components/micropython/esp32/machine_rtc.c" I guess the problems relates to line 333
Yes it is a bug. Thank you for noticing that.
Until fixed, you can set the ime zone with
That way the time zone is saved to NVS and will be restored after reset, power off or deepsleep wake up, so you have to set it only once.