Opened 14 years ago

Closed 14 years ago

#188 closed defect (fixed)

Can't login in admin, when TIME_ZONE set to 'Europe/Riga' in myproject.settings.main

Reported by: edgars@… Owned by: Adrian Holovaty
Component: contrib.admin Version:
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



Admin error traceback after submitting login form:

There's been an error:

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/django/core/handlers/", line 60, in get_response
    response = middleware_method(request, callback, param_dict)

  File "/usr/lib/python2.4/site-packages/django/middleware/", line 49, in process_view
    user = users.get_object(username__exact=username)

  File "/usr/lib/python2.4/site-packages/django/core/", line 87, in _curried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))

  File "/usr/lib/python2.4/site-packages/django/core/", line 1032, in function_get_object
    obj_list = function_get_list(opts, klass, **kwargs)

  File "/usr/lib/python2.4/site-packages/django/core/", line 1059, in function_get_list
    for row in cursor.fetchall():

  File "/usr/lib/python2.4/site-packages/django/core/db/", line 30, in typecast_timestamp
    int(times[0]), int(times[1]), int(seconds.split('-')[0]),

ValueError: invalid literal for int(): 35+03

TIME_ZONE='America/Chicago' works fine though, as well as setting 'Europe/Riga' timezone in TZ environment variable.

Change History (3)

comment:2 Changed 14 years ago by hugo <gb@…>

I added a patch to ticket 219.

comment:3 Changed 14 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [346]) Fixed #219 and #188 -- Database timestamp typecast no longer assumes '-' delineates the time zone

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