]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
formatdate(): A better docstring.
authorBarry Warsaw <barry@python.org>
Fri, 9 Nov 2001 17:07:28 +0000 (17:07 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 9 Nov 2001 17:07:28 +0000 (17:07 +0000)
Lib/email/Utils.py

index 237b68699c4bbecfbff2cb2c0d19d3080727ef1e..93e0a838e3ad02141a0b564c56e0bcc8e032da0d 100644 (file)
@@ -106,13 +106,16 @@ def encode(s, charset='iso-8859-1', encoding='q'):
 
 \f
 def formatdate(timeval=None, localtime=0):
-    """Returns a formatted time as specified by RFC 2822, e.g.:
+    """Returns a date string as specified by RFC 2822, e.g.:
 
     Fri, 09 Nov 2001 01:08:47 -0000
 
-    Optional timeval if given is a float time as accepted by localtime() or
-    gmtime().  Optional localtime is a flag that when true, interprets and
-    returns a time relative to the local timezone instead of UTC.
+    Optional timeval if given is a floating point time value as accepted by
+    gmtime() and localtime(), otherwise the current time is used.
+
+    Optional localtime is a flag that when true, interprets timeval, and
+    returns a date relative to the local timezone instead of UTC, properly
+    taking daylight savings time into account.
     """
     # Note: we cannot use strftime() because that honors the locale and RFC
     # 2822 requires that day and month names be the English abbreviations.