diff --git a/modules/uptime.py b/modules/uptime.py index e1ab8b8..780c7e3 100755 --- a/modules/uptime.py +++ b/modules/uptime.py @@ -7,6 +7,7 @@ import datetime from twisted.internet import defer from module import commands +import tools.time def setup(bot): @@ -75,5 +76,6 @@ def idleTimeWulf(result, bot): def unixtolocal(bot, trigger): """Converts the given timestamp from unix time to local time.""" unix = int(trigger.group(2)) - dt = datetime.datetime.utcfromtimestamp(unix).strftime('%Y-%m-%d %H:%M:%S') - bot.msg(dt) + dt = datetime.datetime.utcfromtimestamp(unix) + dt = dt.replace(tzinfo=datetime.timezone.utc) + bot.msg(dt.astimezone(tz=None).strftime('%Y-%m-%d %H:%M:%S'))