diff --git a/plugins/time.py b/plugins/time.py index b392c33..a3305ff 100755 --- a/plugins/time.py +++ b/plugins/time.py @@ -20,8 +20,13 @@ def time_command(inp, bot=None): time = " ".join(request.xpath("//pod[@title='Result']/subpod/plain" \ "text/text()")) time = time.replace(" | ", ", ") - place = " ".join(request.xpath("//pod[@title='Input interpretation']/" \ - "subpod/plaintext/text()"))[16:].title() + + # nice place name for UNIX time + if inp.lower() == "unix": + place = "Unix Epoch" + else: + place = " ".join(request.xpath("//pod[@title='Input interpretation']/" \ + "subpod/plaintext/text()"))[16:].title() if time: # if wolfram alpha had to guess a place, then show the place it chose @@ -31,4 +36,4 @@ def time_command(inp, bot=None): # return time return "%s - \x02%s\x02" % (time, place) else: - return "Could not get the time for '%s'" % inp \ No newline at end of file + return "Could not get the time for '%s'" % inp