Kaydet (Commit) 5c189b16 authored tarafından Georg Brandl's avatar Georg Brandl

#5365: add quick look conversion table for different time representations.

üst fbb995f6
...@@ -118,6 +118,24 @@ An explanation of some terminology and conventions is in order. ...@@ -118,6 +118,24 @@ An explanation of some terminology and conventions is in order.
The time value sequence was changed from a tuple to a :class:`struct_time`, with The time value sequence was changed from a tuple to a :class:`struct_time`, with
the addition of attribute names for the fields. the addition of attribute names for the fields.
* Use the following functions to convert between time representations:
+-------------------------+-------------------------+-------------------------+
| From | To | Use |
+=========================+=========================+=========================+
| seconds since the epoch | :class:`struct_time` in | :func:`gmtime` |
| | UTC | |
+-------------------------+-------------------------+-------------------------+
| seconds since the epoch | :class:`struct_time` in | :func:`localtime` |
| | local time | |
+-------------------------+-------------------------+-------------------------+
| :class:`struct_time` in | seconds since the epoch | :func:`calendar.timegm` |
| UTC | | |
+-------------------------+-------------------------+-------------------------+
| :class:`struct_time` in | seconds since the epoch | :func:`mktime` |
| local time | | |
+-------------------------+-------------------------+-------------------------+
The module defines the following functions and data items: The module defines the following functions and data items:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment