Opened 18 years ago

Closed 18 years ago

#2499 closed enhancement (invalid)

Sessions problem with GMT settings...

Reported by: msw@… Owned by: Adrian Holovaty
Component: Contrib apps Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

please see line 87 of contrib\sessions\middleware:
87 expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE), "%a, %d-%b-%Y %H:%M:%S GMT")

There is error in this line, if user works in not GMT time (for example, GMT+2, etc)...
So, please correct this line :)

Change History (5)

comment:1 by msw@…, 18 years ago

ADD: not correctly using datetime.datetime.utcnow() function call, i think... am i right?

comment:2 by msw@…, 18 years ago

Type: defectenhancement

Sorry, but maybe i am mistaken... if i set TIME_ZONE to "UTC" then all working correctly... :) But anyway - something wrong with Time settings in Django code... so i correct type of this Ticket to enhancement

comment:3 by Simon G. <dev@…>, 18 years ago

Can anyone provide more info on this? a test case?

comment:4 by Michael Radziej <mir@…>, 18 years ago

msw, is this perhaps about Microsoft Windows (then it's been solved in the meantime!)

comment:5 by Chris Beaven, 18 years ago

Resolution: invalid
Status: newclosed

This looks invalid to me. If we're using datetime.utcnow() then it's fine to use "GMT" in our cookie - in fact it's probably easier.

Note: See TracTickets for help on using tickets.
Back to Top