add wikipedia link

This commit is contained in:
Ben Harris 2021-08-02 15:43:17 -04:00
parent 0ab9cc662e
commit 97c02c0abf
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ class Module(ModuleManager.BaseModule):
@utils.hook("received.command.beat")
@utils.kwarg("help", "Gives the current .beat time")
def beat(self, event):
# https://en.wikipedia.org/wiki/Swatch_Internet_Time
# UTC + 1 / Biel Mean Time
now = datetime.now(timezone(timedelta(hours=1)))
beat_time = ((now.hour * 3600) + (now.minute * 60) + now.second) / 86.4
event["stdout"].write(f"The current .beat time is @{beat_time:0.2f}")