Opened 8 years ago

Last modified 3 years ago

#7090 new defect

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

Reported by: Thomas Moschny Owned by:
Priority: normal Component: IrcLogsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


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/", line 450, in _dispatch_request
  File "/opt/trac/lib/python2.6/site-packages/Trac-0.11.7-py2.6.egg/trac/web/", 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/", line 107, in process_request
    results += list(source.get_search_results(req, terms, filters))
  File "build/bdist.linux-x86_64/egg/irclogs/", 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 (2)

comment:1 Changed 8 years ago by anonymous

Owner: changed from John Hampton to Robert Corsaro

comment:2 Changed 3 years ago by Ryan J Ollos

Owner: Robert Corsaro deleted

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.

Add Comment

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

Note: See TracTickets for help on using tickets.