Skip to content

Commit

Permalink
[clock] Fix an error when user or channel TZ are unkown
Browse files Browse the repository at this point in the history
This fixes an error where using .t without a parameter when no configuration exist for user or channel TZ raises an exception instead of using UTC
  • Loading branch information
Elad Alfassa committed Jun 22, 2013
1 parent 8c16c2c commit 05594dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def f_time(bot, trigger):
tz = bot.db.preferences.get(trigger.nick, 'tz')
if not tz and trigger.sender in bot.db.preferences:
tz = bot.db.preferences.get(trigger.sender, 'tz') or 'UTC'
else:
tz = 'UTC'
else:
tz = 'UTC'
tzi = pytz.timezone(tz)
Expand Down

0 comments on commit 05594dc

Please sign in to comment.