This release redoes this library to use native sockets and UDP to fetch the time. The API has drastically changed so make sure and update.
If you are using ESP32SPI still you can update the time directly with:
python
with other imports
import rtc
get_time will raise ValueError if the time isn't available yet so loop until
it works.
now_utc = None
while now_utc is None:
try:
now_utc = time.localtime(esp.get_time()[0])
except ValueError:
pass
rtc.RTC().datetime = now_utc
To use in CircuitPython, simply install the [Adafruit CircuitPython Bundle](https://circuitpython.org/libraries).
To use in CPython, `pip3 install adafruit-circuitpython-ntp`.
Read the [docs](http://circuitpython.readthedocs.io/projects/ntp/en/latest/) for info on how to use it.