Message info
To: From:Django Subject:Re: [Django] #17931: set_cookie timezone naive vs aware Date:Sun, 18 Mar 2012 16:58:38 -0000

#17931: set_cookie timezone naive vs aware
Reporter: jaddison | Owner: aaugustin
Type: Bug | Status: new
Component: HTTP handling | Version: SVN
Severity: Release blocker | Resolution:
Keywords: timezone, cookie | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
Changes (by aaugustin):

* has_patch: 0 => 1


`set_cookie` is a bit of a special case already -- its `expires` argument
must be "a naive datetime in UTC", while everything else happens (well,
used to happen) in local time in Django. If you use it, you probably have
either `TIME_ZONE = "UTC"` or some conversion code.

Anyway, with aware datetimes being the standard when ``USE_TZ = True``, it
makes sense to accept them in `set_cookie`. Does the attached patch fix
your problem?

Ticket URL: <>
Django <>
The Web framework for perfectionists with deadlines.

You received this message because you are subscribed to the Google Groups "Django updates" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at