]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
add expires docs to set_cookie. 2389/head
authorpeacetara <tara@birl.org>
Thu, 17 May 2018 17:09:36 +0000 (10:09 -0700)
committerGitHub <noreply@github.com>
Thu, 17 May 2018 17:09:36 +0000 (10:09 -0700)
update set_cookie docstring to explain what expires will accept and behave properly, without having to go track down httputil.format_timestamp, which is not exposed in the docs(that I could find).

tornado/web.py

index 4e307826db71fd68ab9d466b9c87dd3ef23bc6fe..3d6a3e198f3ade792d24249e7fc168fef349afb8 100644 (file)
@@ -542,6 +542,10 @@ class RequestHandler(object):
 
         Newly-set cookies are not immediately visible via `get_cookie`;
         they are not present until the next request.
+        
+        expires may be a numeric timestamp as returned by `time.time`,
+        a time tuple as returned by `time.gmtime`, or a 
+        `datetime.datetime` object.
 
         Additional keyword arguments are set on the cookies.Morsel
         directly.