adafruit-circuitpython-ntp 3.3.7__tar.gz → 3.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/PKG-INFO +1 -1
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_circuitpython_ntp.egg-info/PKG-INFO +1 -1
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_ntp.py +12 -12
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/pyproject.toml +1 -1
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.gitattributes +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/workflows/build.yml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/workflows/failure-help-text.yml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/workflows/release_gh.yml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/workflows/release_pypi.yml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.gitignore +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.pre-commit-config.yaml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.readthedocs.yaml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/CODE_OF_CONDUCT.md +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSE +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSES/CC-BY-4.0.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSES/MIT.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSES/Unlicense.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/README.rst +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/README.rst.license +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_circuitpython_ntp.egg-info/SOURCES.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_circuitpython_ntp.egg-info/dependency_links.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_circuitpython_ntp.egg-info/requires.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/adafruit_circuitpython_ntp.egg-info/top_level.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/_static/custom.css +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/_static/favicon.ico +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/_static/favicon.ico.license +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/api.rst +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/api.rst.license +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/conf.py +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/examples.rst +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/examples.rst.license +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/index.rst +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/index.rst.license +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/requirements.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_connection_manager.py +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_cpython.py +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_set_rtc.py +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_simpletest.py +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/optional_requirements.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/requirements.txt +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/ruff.toml +0 -0
- {adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/setup.cfg +0 -0
|
@@ -25,7 +25,7 @@ import time
|
|
|
25
25
|
|
|
26
26
|
from micropython import const
|
|
27
27
|
|
|
28
|
-
__version__ = "3.3.
|
|
28
|
+
__version__ = "3.3.8"
|
|
29
29
|
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_NTP.git"
|
|
30
30
|
|
|
31
31
|
NTP_TO_UNIX_EPOCH = 2208988800 # 1970-01-01 00:00:00
|
|
@@ -36,6 +36,17 @@ class NTP:
|
|
|
36
36
|
"""Network Time Protocol (NTP) helper module for CircuitPython.
|
|
37
37
|
This module does not handle daylight savings or local time. It simply requests
|
|
38
38
|
UTC from a NTP server.
|
|
39
|
+
|
|
40
|
+
:param object socketpool: A socket provider such as CPython's `socket` module.
|
|
41
|
+
:param str server: The domain of the ntp server to query.
|
|
42
|
+
:param int port: The port of the ntp server to query.
|
|
43
|
+
:param float tz_offset: Timezone offset in hours from UTC. Only useful for timezone ignorant
|
|
44
|
+
CircuitPython. CPython will determine timezone automatically and adjust (so don't use
|
|
45
|
+
this.) For example, Pacific daylight savings time is -7.
|
|
46
|
+
:param int socket_timeout: UDP socket timeout, in seconds.
|
|
47
|
+
:param int cache_seconds: how many seconds to use a cached result from NTP server
|
|
48
|
+
(default 0, which respects NTP server's minimum).
|
|
49
|
+
|
|
39
50
|
"""
|
|
40
51
|
|
|
41
52
|
def __init__(
|
|
@@ -48,17 +59,6 @@ class NTP:
|
|
|
48
59
|
socket_timeout: int = 10,
|
|
49
60
|
cache_seconds: int = 0,
|
|
50
61
|
) -> None:
|
|
51
|
-
"""
|
|
52
|
-
:param object socketpool: A socket provider such as CPython's `socket` module.
|
|
53
|
-
:param str server: The domain of the ntp server to query.
|
|
54
|
-
:param int port: The port of the ntp server to query.
|
|
55
|
-
:param float tz_offset: Timezone offset in hours from UTC. Only useful for timezone ignorant
|
|
56
|
-
CircuitPython. CPython will determine timezone automatically and adjust (so don't use
|
|
57
|
-
this.) For example, Pacific daylight savings time is -7.
|
|
58
|
-
:param int socket_timeout: UDP socket timeout, in seconds.
|
|
59
|
-
:param int cache_seconds: how many seconds to use a cached result from NTP server
|
|
60
|
-
(default 0, which respects NTP server's minimum).
|
|
61
|
-
"""
|
|
62
62
|
self._pool = socketpool
|
|
63
63
|
self._server = server
|
|
64
64
|
self._port = port
|
|
@@ -12,7 +12,7 @@ requires = [
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "adafruit-circuitpython-ntp"
|
|
14
14
|
description = "Network Time Protocol (NTP) helper for Python"
|
|
15
|
-
version = "3.3.
|
|
15
|
+
version = "3.3.8"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
authors = [
|
|
18
18
|
{name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSES/CC-BY-4.0.txt
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/LICENSES/Unlicense.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/_static/custom.css
RENAMED
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/_static/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/examples.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/docs/index.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_cpython.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_set_rtc.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/examples/ntp_simpletest.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_ntp-3.3.7 → adafruit_circuitpython_ntp-3.3.8}/optional_requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|