Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime.timestamp() returning incorrect time #24

Open
EssentiallyNoah opened this issue Jan 26, 2024 · 0 comments
Open

datetime.timestamp() returning incorrect time #24

EssentiallyNoah opened this issue Jan 26, 2024 · 0 comments

Comments

@EssentiallyNoah
Copy link

Running this:

import time
from adafruit_datetime import datetime

dt = datetime(2024, 1, 26, 1, 2, 3)
print(int(dt.timestamp()))
print(time.mktime(dt.timetuple()))

Returns this:

>>> 1706230784
>>> 1706230923

The epoch timestamp from time.mktime() is correct while the timestamp from dt.timestamp() is 139 seconds early. This code is running on the Challenger RP2040 WIFI MkII with CircuitPython 8.2.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant