Modify

Opened 5 years ago

Last modified 4 years ago

#7090 new defect

LocalTimezone' object has no attribute 'normalize' (user with 'default' timezone)

Reported by: thomas.moschny@… Owned by: doki_pen
Priority: normal Component: IrcLogsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

This is, in principle, the same problem as #3550 and #5791, but at a different source location, so no duplicate.

When a user with default timezone issues a search, this error is thrown:

Traceback (most recent call last):
  File "/opt/trac/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/main.py", line 450, in _dispatch_request
    dispatcher.dispatch(req)
  File "/opt/trac/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/main.py", line 206, in dispatch
    resp = chosen_handler.process_request(req)
  File "/opt/trac/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/search/web_ui.py", line 107, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "build/bdist.linux-x86_64/egg/irclogs/search.py", line 49, in get_search_results
    user_dt = tz.normalize(server_dt.astimezone(tz))
AttributeError: 'LocalTimezone' object has no attribute 'normalize'

As with the other tickets, a workaround is to set either the user's or trac's default timezone to a pytz (i.e. named) timezone.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by anonymous

  • Owner changed from pacopablo to doki_pen

Add Comment

Modify Ticket

Action
as new The owner will remain doki_pen.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.