We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c024272 commit b2ee818Copy full SHA for b2ee818
adafruit_datetime.py
@@ -1520,7 +1520,14 @@ def toordinal(self) -> int:
1520
return _ymd2ord(self._year, self._month, self._day)
1521
1522
def timestamp(self) -> float:
1523
- "Return POSIX timestamp as float"
+ """Return POSIX timestamp as float.
1524
+
1525
+ Note that Floats on most
1526
+ boards are encoded in 30 bits internally, with effectively 22
1527
+ bits of precision. As a result, for modern dates this value
1528
+ can be off by several minutes. As a workaround you can access
1529
+ the function ``_mitime()`` to get an int version of the timestamp.
1530
+ """
1531
if not self._tzinfo is None:
1532
return (self - _EPOCH).total_seconds()
1533
s = self._mktime()
0 commit comments