[Python-checkins] r70026 - python/trunk/Doc/library/time.rst

georg.brandl python-checkins at python.org
Fri Feb 27 17:59:03 CET 2009


Author: georg.brandl
Date: Fri Feb 27 17:59:03 2009
New Revision: 70026

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

Modified:
   python/trunk/Doc/library/time.rst

Modified: python/trunk/Doc/library/time.rst
==============================================================================
--- python/trunk/Doc/library/time.rst	(original)
+++ python/trunk/Doc/library/time.rst	Fri Feb 27 17:59:03 2009
@@ -118,6 +118,24 @@
      The time value sequence was changed from a tuple to a :class:`struct_time`, with
      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:
 


More information about the Python-checkins mailing list