Fix af24192b0f (support for struct_time in utils.str.timestamp).

This commit is contained in:
Valentin Lorentz 2014-07-31 19:56:17 +02:00
parent ca425b7b0a
commit 70ad232887

View File

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