Time: Explicitely handle the 'now' case.

dateutil never handled it, and just returned the current day.
https://github.com/dateutil/dateutil/issues/212
This commit is contained in:
Valentin Lorentz 2016-03-08 22:40:41 +01:00
parent 7f38076e59
commit fc3c9eec7c

View File

@ -114,7 +114,7 @@ class Time(callbacks.Plugin):
and see if it will work. and see if it will work.
If the <time string> is not given, defaults to now. If the <time string> is not given, defaults to now.
""" """
if not s: if not s or s == 'now':
irc.reply(str(int(time.time()))) irc.reply(str(int(time.time())))
return return
if not parse: if not parse: