← index #16500Issue #11148
Related · high · value 2.318
QUERY · ISSUE

docs: time.mktime requires one positional argument

openby maxi07opened 2024-12-29updated 2025-10-03
docs

Documentation URL

No response

Description

when running the function time.mktime(), an exception occurs as the function does require one positional argument. But this is not documented, although it states "t’s argument is a full 8-tuple" inside the description.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

docs: for time.localtime()

closedby hasenradballopened 2023-03-29updated 2024-07-13

Hi Together,

I would remark that this description in the Doc is a little bit missleading.

'''
time.mktime()
https://docs.micropython.org/en/latest/library/time.html
This is inverse function of localtime. It’s argument is a full 8-tuple which expresses a time as per localtime. It returns an integer which is the number of seconds since Jan 1, 2000.
''''

Because on the Pico W the RTC works with the epoch since 1970.
Maybe a small redesign of this description would be perfect, my opinion.

A other point is that I want to aks what the actual status is about:
time.gmtime()
time.localtime()

Is there actually a Timezone information available in micropython?
If not Iam right that these two functions leads to the same result in time structure?

Thanks
Frank

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied