adafruit_ntp
¶
Network Time Protocol (NTP) helper for CircuitPython
Author(s): Scott Shawcroft
Implementation Notes¶
Hardware: Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- class adafruit_ntp.NTP(socketpool, *, server: str = '0.adafruit.pool.ntp.org', port: int = 123, tz_offset: float = 0, socket_timeout: int = 10)¶
Network Time Protocol (NTP) helper module for CircuitPython. This module does not handle daylight savings or local time. It simply requests UTC from a NTP server.
- property datetime: struct_time¶
Current time from NTP server. Accessing this property causes the NTP time request, unless there has already been a recent request. Raises OSError exception if no response is received within socket_timeout seconds