Generating a timestamp without 8 tuples #10125
Unanswered
nikrawlinson
asked this question in
Using MicroPython
Replies: 1 comment 1 reply
-
I think you can achieve what you would like to achieve by creating an 8-tuple that looks looks like this: (YYYY, MM, DD, HH, MM, SS, 0, 0) The last two entries in the tuple which are week-day and year-day can be set to 0.
In most MicroPython ports (all?) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using an API to access data that provides times and dates for events in the following format:
YYYY-MM-DDTHH:MM:SS
So, for example:
2202-11-29T02:29:30
I can convert this to a timestamp in Python so that I can calculate seconds since epoch time, but am having difficulty doing the same in Micropython using time or utime as I don't have eight tuples. Can anyone suggest how I could achieve this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions