This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author regu0004
Recipients regu0004
Date 2014-08-29.10:00:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409306450.24.0.723741077293.issue22296@psf.upfronthosting.co.za>
In-reply-to
Content
The cookielib module uses time.time(), which produces a timestamp in the local timezone (as read from the system time?), as the timestamp against which expiration dates in cookies are compared.

However, typical usage of HTTP cookies would be specifying the expiration date in UTC. This assumption seems to be supported for example by the inclusion of cookielib.http2time, which (only) supports UTC timestamps.

This behaviour is also included in e.g. MozillaCookieJar, which (erroneously) excludes cookies from being saved/loaded based on the local timestamp from time.time().

See the attached file for a small example where the check if a cookie is expired against a UTC time is correct but the check against local time fails (simulating the behaviour of the cookielib module).
History
Date User Action Args
2014-08-29 10:00:50regu0004setrecipients: + regu0004
2014-08-29 10:00:50regu0004setmessageid: <1409306450.24.0.723741077293.issue22296@psf.upfronthosting.co.za>
2014-08-29 10:00:50regu0004linkissue22296 messages
2014-08-29 10:00:49regu0004create