diff --git a/adafruit_datetime.py b/adafruit_datetime.py index 99e30a4..83dceef 100755 --- a/adafruit_datetime.py +++ b/adafruit_datetime.py @@ -1520,7 +1520,14 @@ def toordinal(self) -> int: return _ymd2ord(self._year, self._month, self._day) def timestamp(self) -> float: - "Return POSIX timestamp as float" + """Return POSIX timestamp as float. + + Note that Floats on most boards are encoded in 30 bits + internally, with effectively 22 bits of precision. As a result, + for modern dates this value can be off by several minutes. + As a workaround you can access the function ``_mktime()`` + to get an int version of the timestamp. + """ if not self._tzinfo is None: return (self - _EPOCH).total_seconds() s = self._mktime() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy