From 346e7a55482dfe63e4fea7a4865c7d5354910aba Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 29 Sep 2013 18:46:56 -0700 Subject: [PATCH] Add !epoch --- earwigbot/commands/time_command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/earwigbot/commands/time_command.py b/earwigbot/commands/time_command.py index 3754986..4ca91bd 100644 --- a/earwigbot/commands/time_command.py +++ b/earwigbot/commands/time_command.py @@ -32,12 +32,15 @@ pytz = importer.new("pytz") class Time(Command): """Report the current time in any timezone (UTC default), or in beats.""" name = "time" - commands = ["time", "beats", "swatch"] + commands = ["time", "beats", "swatch", "epoch"] def process(self, data): if data.command in ["beats", "swatch"]: self.do_beats(data) return + if data.command == "epoch": + self.reply(data, time()) + return if data.args: timezone = data.args[0] else: