summaryrefslogtreecommitdiffstats
path: root/Doc/library/imaplib.rst
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-23 01:03:39 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2012-06-23 01:03:39 (GMT)
commit8141cc7f8895778a430c4c8a65c65310e3c6afe7 (patch)
tree97468b29a67c9e3048815eb89ece3bfde2fe199b /Doc/library/imaplib.rst
parent60c13ddd9b03cb28f454e37ddb1214d4ae4f5e82 (diff)
downloadcpython-8141cc7f8895778a430c4c8a65c65310e3c6afe7.zip
cpython-8141cc7f8895778a430c4c8a65c65310e3c6afe7.tar.gz
cpython-8141cc7f8895778a430c4c8a65c65310e3c6afe7.tar.bz2
Issues #11024: Fixes and additional tests for Time2Internaldate.
Diffstat (limited to 'Doc/library/imaplib.rst')
-rw-r--r--Doc/library/imaplib.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst
index 038355c..fefb284 100644
--- a/Doc/library/imaplib.rst
+++ b/Doc/library/imaplib.rst
@@ -113,13 +113,15 @@ The following utility functions are defined:
.. function:: Time2Internaldate(date_time)
- Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The
- return value is a string in the form: ``"DD-Mmm-YYYY HH:MM:SS
- +HHMM"`` (including double-quotes). The *date_time* argument can be a
- number (int or float) representing seconds since epoch (as returned
- by :func:`time.time`), a 9-tuple representing local time (as returned by
- :func:`time.localtime`), or a double-quoted string. In the last case, it
- is assumed to already be in the correct format.
+ Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation.
+ The return value is a string in the form: ``"DD-Mmm-YYYY HH:MM:SS
+ +HHMM"`` (including double-quotes). The *date_time* argument can
+ be a number (int or float) representing seconds since epoch (as
+ returned by :func:`time.time`), a 9-tuple representing local time
+ an instance of :class:`time.struct_time` (as returned by
+ :func:`time.localtime`), an aware instance of
+ :class:`datetime.datetime`, or a double-quoted string. In the last
+ case, it is assumed to already be in the correct format.
Note that IMAP4 message numbers change as the mailbox changes; in particular,
after an ``EXPUNGE`` command performs deletions the remaining messages are