Changes between Initial Version and Version 1 of Ticket #17931, comment 2


Ignore:
Timestamp:
Mar 18, 2012, 12:00:41 PM (13 years ago)
Author:
Aymeric Augustin

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17931, comment 2

    initial v1  
    11`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.
    22
    3 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?
     3Anyway, with aware datetimes being the standard when `USE_TZ = True`, and the general recommendation to use `timezone.now()` (as `facebookapp` does in the traceback above), it makes sense to accept them in `set_cookie`. Does the attached patch fix your problem?
    44
Back to Top