Skip to content

Commit 2f86441

Browse files
robert-hhdpgeorge
authored andcommitted
docs/library/time: Amend the documentation of time.mktime().
By showing the argument and refer to epoch instead of a fixed date. The note about epoch lists the ports using the POSIX epoch. Signed-off-by: robert-hh <[email protected]>
1 parent bbdc832 commit 2f86441

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/library/time.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
The ``time`` module provides functions for getting the current time and date,
1010
measuring time intervals, and for delays.
1111

12-
**Time Epoch**: Unix port uses standard for POSIX systems epoch of
13-
1970-01-01 00:00:00 UTC. However, some embedded ports use epoch of
14-
2000-01-01 00:00:00 UTC. Epoch year may be determined with ``gmtime(0)[0]``.
12+
**Time Epoch**: The unix, windows, webassembly, alif, mimxrt and rp2 ports
13+
use the standard for POSIX systems epoch of 1970-01-01 00:00:00 UTC.
14+
The other embedded ports use an epoch of 2000-01-01 00:00:00 UTC.
15+
Epoch year may be determined with ``gmtime(0)[0]``.
1516

1617
**Maintaining actual calendar date/time**: This requires a
1718
Real Time Clock (RTC). On systems with underlying OS (including some
@@ -57,11 +58,11 @@ Functions
5758
* weekday is 0-6 for Mon-Sun
5859
* yearday is 1-366
5960

60-
.. function:: mktime()
61+
.. function:: mktime(date_time_tuple)
6162

6263
This is inverse function of localtime. It's argument is a full 8-tuple
6364
which expresses a time as per localtime. It returns an integer which is
64-
the number of seconds since Jan 1, 2000.
65+
the number of seconds since the time epoch.
6566

6667
.. function:: sleep(seconds)
6768

0 commit comments

Comments
 (0)