Fix utils.str.timestamp for ints.

This commit is contained in:
Valentin Lorentz 2014-07-31 19:37:57 +00:00
parent 4a3d39e747
commit 0f174d9ee0

View File

@ -374,7 +374,7 @@ registerChannelValue(supybot.reply.format, 'time',
def timestamp(t):
if t is None:
t = time.time()
elif isinstance(t, float):
elif isinstance(t, float) or isinstance(t, int):
t = time.localtime(t)
format = get(supybot.reply.format.time, dynamic.channel)
return time.strftime(format, t)