Skip to content

time.time() is off by 30 years #14114

Answered by Josverl
dannybr asked this question in ESP32
Mar 17, 2024 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

The majority of MCU ports of Micropython uses a different epoch (start datetime) than CPython.

epoch of 2000-01-01 00:00:00 UTC. Epoch year may be determined with gmtime(0)[0].

See https://docs.micropython.org/en/latest/library/time.html

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mattytrentini
Comment options

You must be logged in to vote
1 reply
@Josverl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ESP32
Labels
None yet
3 participants