Opened 19 years ago
Closed 19 years ago
#2499 closed enhancement (invalid)
Sessions problem with GMT settings...
| Reported by: | 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 , 19 years ago
comment:2 by , 19 years ago
| Type: | defect → enhancement |
|---|
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:4 by , 19 years ago
msw, is this perhaps about Microsoft Windows (then it's been solved in the meantime!)
comment:5 by , 19 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
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.
ADD: not correctly using datetime.datetime.utcnow() function call, i think... am i right?