﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33562	set_cookie and set_signed_cookie should accept timedelta object for max_age argument	Luke Plant	Luke Plant	"This already works for `get_signed_cookie`:
{{{#!python
>>> request.get_signed_cookie(""mykey"", max_age=timedelta(days=3))
}}}

This is due to the underlying behaviour of `TimestampSigner`, which was fixed to do this in #21363.

But for `set_cookie` and `set_signed_cookie` it accepts only a number:

{{{#!python
>>> response = HttpResponse()
>>> response.set_cookie(""mykey"", max_age=timedelta(days=3))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'datetime.timedelta'
}}}

"	New feature	closed	HTTP handling	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
