Skip to content

Commit

Permalink
Fix style.
Browse files Browse the repository at this point in the history
  • Loading branch information
izzy84075 committed Feb 10, 2015
1 parent 7075c25 commit 888cf96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chanlogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,21 @@ def configure(config):
# could ask if user wants to customize message templates,
# but that seems unnecessary


def get_datetime(bot):
"""
Returns a datetime object of the current time.
"""
dt = datetime.utcnow()
if pytz:
dt = dt.replace(tzinfo = timezone('UTC'))
dt = dt.replace(tzinfo=timezone('UTC'))
if bot.config.chanlogs.localtime:
dt = dt.astimezone(timezone(bot.config.clock.tz))
if not bot.config.chanlogs.microseconds:
dt = dt.replace(microsecond=0)
return dt


def get_fpath(bot, trigger, channel=None):
"""
Returns a string corresponding to the path to the file where the message
Expand Down

0 comments on commit 888cf96

Please sign in to comment.