From 5b43db1aede3b4851f7755aaca9569f7e05a5733 Mon Sep 17 00:00:00 2001 From: peacetara Date: Thu, 17 May 2018 10:09:36 -0700 Subject: [PATCH] add expires docs to set_cookie. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tornado/web.py b/tornado/web.py index 4e307826d..3d6a3e198 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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. -- 2.47.2