Skip to content

Commit

Permalink
Member-specific tz should obey as_tzinfo argument in default_timezone()
Browse files Browse the repository at this point in the history
  • Loading branch information
seanupton committed Aug 27, 2013
1 parent c0f9895 commit 35ddb46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plone/app/event/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ def default_timezone(context=None, as_tzinfo=False):
member = membership.getAuthenticatedMember()
member_timezone = member.getProperty('timezone', None)
if member_timezone:
return pytz.timezone(member_timezone).zone
info = pytz.timezone(member_timezone)
return info if as_tzinfo else info.zone

portal_timezone = None
reg = queryUtility(IRegistry, context=context, default=None)
Expand Down

1 comment on commit 35ddb46

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing information:

Please sign in to comment.